From 3da6540b494356424d3bd367deaddc857dcaadf6 Mon Sep 17 00:00:00 2001 From: Ykkrosh Date: Thu, 15 Jul 2004 09:52:59 +0000 Subject: [PATCH] Output BOM and correct line endings in crashlog.txt This was SVN commit r758. --- source/lib/sysdep/win/wdbg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/lib/sysdep/win/wdbg.cpp b/source/lib/sysdep/win/wdbg.cpp index c6c99786d8..689be8d5ee 100755 --- a/source/lib/sysdep/win/wdbg.cpp +++ b/source/lib/sysdep/win/wdbg.cpp @@ -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);