Output BOM and correct line endings in crashlog.txt

This was SVN commit r758.
This commit is contained in:
Ykkrosh
2004-07-15 09:52:59 +00:00
parent b284b47a06
commit 3da6540b49
+3 -1
View File
@@ -684,7 +684,9 @@ int debug_write_crashlog(const char* file)
int len = swprintf(buf, 1000, L"Undefined state reached.\r\n");
walk_stack(2, buf+len);
FILE* f = fopen(file, "w");
FILE* f = fopen(file, "wb");
int BOM = 0xFEFF;
fwrite(&BOM, 2, 1, f);
fwrite(buf, pos-buf, 2, f);
fclose(f);