summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_console.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_console.cc')
-rw-r--r--winsup/cygwin/fhandler_console.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 458c5a337..76c8065d3 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -538,7 +538,7 @@ fhandler_console::open (path_conv *, int flags, mode_t)
set_io_handle (INVALID_HANDLE_VALUE);
set_output_handle (INVALID_HANDLE_VALUE);
- set_flags (flags & ~O_TEXT, O_BINARY);
+ set_flags ((flags & ~O_TEXT) | O_BINARY);
/* Open the input handle as handle_ */
h = CreateFileA ("CONIN$", GENERIC_READ|GENERIC_WRITE,