diff options
-rw-r--r-- | win32/winansi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/winansi.c b/win32/winansi.c index 66b040b31..dc98b9d2b 100644 --- a/win32/winansi.c +++ b/win32/winansi.c | |||
@@ -1590,8 +1590,10 @@ static int conv_fwriteCon(FILE *stream, char *buf, size_t siz) | |||
1590 | { | 1590 | { |
1591 | if (conout_conv_enabled()) { | 1591 | if (conout_conv_enabled()) { |
1592 | #if ENABLE_FEATURE_UTF8_OUTPUT | 1592 | #if ENABLE_FEATURE_UTF8_OUTPUT |
1593 | if (GetConsoleOutputCP() != CP_UTF8) | 1593 | if (GetConsoleOutputCP() != CP_UTF8) { |
1594 | fflush(stream); // writeCon_utf8 is unbuffered | ||
1594 | return writeCon_utf8(fileno(stream), buf, siz) ? EOF : 0; | 1595 | return writeCon_utf8(fileno(stream), buf, siz) ? EOF : 0; |
1596 | } | ||
1595 | #else | 1597 | #else |
1596 | charToConBuffA(buf, siz); | 1598 | charToConBuffA(buf, siz); |
1597 | #endif | 1599 | #endif |