diff options
Diffstat (limited to '')
-rw-r--r-- | win32/winansi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/winansi.c b/win32/winansi.c index c7529c453..427c71f11 100644 --- a/win32/winansi.c +++ b/win32/winansi.c | |||
@@ -160,7 +160,7 @@ int FAST_FUNC terminal_mode(int reset) | |||
160 | mode |= VT_INPUT; | 160 | mode |= VT_INPUT; |
161 | } | 161 | } |
162 | 162 | ||
163 | if (newmode != oldmode) { | 163 | if (reset && newmode != oldmode) { |
164 | if (!SetConsoleMode(h, newmode)) { | 164 | if (!SetConsoleMode(h, newmode)) { |
165 | if (mode >= 4) | 165 | if (mode >= 4) |
166 | mode &= ~VT_INPUT; | 166 | mode &= ~VT_INPUT; |
@@ -1182,7 +1182,7 @@ char *winansi_fgets(char *s, int size, FILE *stream) | |||
1182 | /* Ensure that isatty(fd) returns 0 for the NUL device */ | 1182 | /* Ensure that isatty(fd) returns 0 for the NUL device */ |
1183 | int mingw_isatty(int fd) | 1183 | int mingw_isatty(int fd) |
1184 | { | 1184 | { |
1185 | int result = _isatty(fd); | 1185 | int result = _isatty(fd) != 0; |
1186 | 1186 | ||
1187 | if (result) { | 1187 | if (result) { |
1188 | HANDLE handle = (HANDLE) _get_osfhandle(fd); | 1188 | HANDLE handle = (HANDLE) _get_osfhandle(fd); |