From ce0a1d678fbc8efa5fd384fd0227b7b3dc97cadd Mon Sep 17 00:00:00 2001 From: Tamar Christina Date: Sun, 26 Jul 2020 00:10:23 +0100 Subject: winio: fix detection of tty terminals --- libraries/base/cbits/IOutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/base/cbits/IOutils.c b/libraries/base/cbits/IOutils.c index 8d3ae35588..b5098d6540 100644 --- a/libraries/base/cbits/IOutils.c +++ b/libraries/base/cbits/IOutils.c @@ -209,8 +209,8 @@ __is_console(HANDLE hFile) DWORD handleType = GetFileType (hFile); /* TTY must be a character device */ - if (handleType == FILE_TYPE_CHAR) - return true; + if (handleType != FILE_TYPE_CHAR) + return false; DWORD st; /* GetConsoleMode appears to fail when it's not a TTY. In -- cgit v1.2.1