summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2020-07-26 00:10:23 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-07-26 13:25:11 -0400
commitce0a1d678fbc8efa5fd384fd0227b7b3dc97cadd (patch)
treea5369404adb82a38a0b868bb7f8222700f38f894 /libraries
parent8236925fc8cc2e6e3fed61a0676fa65270a4a538 (diff)
downloadhaskell-ce0a1d678fbc8efa5fd384fd0227b7b3dc97cadd.tar.gz
winio: fix detection of tty terminals
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/cbits/IOutils.c4
1 files 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