diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-11-06 10:04:02 (GMT) |
commit | 179e8f4df7568f6aca6e53525abfe0505fd2a578 (patch) | |
tree | c9328ec8e0afd8af8a96b9f3da12b152cec7c281 /win/tclWinError.c | |
parent | c5a85dbfdc7dce9328b7f5fffb0bae519f68cf9f (diff) | |
parent | 2798a075ee62ea5ab4aa80279d614a8634ba378a (diff) | |
download | tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.zip tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.gz tcl-179e8f4df7568f6aca6e53525abfe0505fd2a578.tar.bz2 |
merge core-8-branch
Diffstat (limited to 'win/tclWinError.c')
-rw-r--r-- | win/tclWinError.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/win/tclWinError.c b/win/tclWinError.c index fea4b0f..bce81fa 100644 --- a/win/tclWinError.c +++ b/win/tclWinError.c @@ -391,7 +391,7 @@ tclWinDebugPanic( if (IsDebuggerPresent()) { WCHAR msgString[TCL_MAX_WARN_LEN]; - char buf[TCL_MAX_WARN_LEN * TCL_UTF_MAX]; + char buf[TCL_MAX_WARN_LEN * 3]; vsnprintf(buf, sizeof(buf), format, argList); msgString[TCL_MAX_WARN_LEN-1] = L'\0'; @@ -406,6 +406,9 @@ tclWinDebugPanic( } OutputDebugStringW(msgString); } else { + if (!isatty(fileno(stderr))) { + fprintf(stderr, "\xef\xbb\xbf"); + } vfprintf(stderr, format, argList); fprintf(stderr, "\n"); fflush(stderr); |