diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-03-15 23:01:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-03-15 23:01:00 (GMT) |
commit | ba9cf35aa3b00da4e6572ea14c0790b10d733f4b (patch) | |
tree | 471bd210560cf89a3e3cfe679a8e8e95b45af2a5 | |
parent | db41a49d9cd891820e877f97e213d478d1ce6e1d (diff) | |
download | tcl-ba9cf35aa3b00da4e6572ea14c0790b10d733f4b.zip tcl-ba9cf35aa3b00da4e6572ea14c0790b10d733f4b.tar.gz tcl-ba9cf35aa3b00da4e6572ea14c0790b10d733f4b.tar.bz2 |
In case of redirecting stderr to a file on Windows, append CRLF after Panic output.
-rw-r--r-- | win/tclWinPanic.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/win/tclWinPanic.c b/win/tclWinPanic.c index f7d9a72..d23ffcd 100644 --- a/win/tclWinPanic.c +++ b/win/tclWinPanic.c @@ -59,7 +59,8 @@ Tcl_ConsolePanic( WriteConsoleW(handle, msgString, wcslen(msgString), &dummy, 0); } else { buf[0] = 0xEF; buf[1] = 0xBB; buf[2] = 0xBF; /* UTF-8 bom */ - WriteFile(handle, buf, 3, &dummy, 0); + WriteFile(handle, buf, strlen(buf), &dummy, 0); + WriteFile(handle, "\n", 1, &dummy, 0); FlushFileBuffers(handle); } # if defined(__GNUC__) |