mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-27 15:26:40 +00:00
Output BOM and correct line endings in crashlog.txt
This was SVN commit r758.
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user