summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/fhandler_registry.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/fhandler_registry.cc')
-rw-r--r--winsup/cygwin/fhandler_registry.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_registry.cc b/winsup/cygwin/fhandler_registry.cc
index 94220c62a..f8808dfe4 100644
--- a/winsup/cygwin/fhandler_registry.cc
+++ b/winsup/cygwin/fhandler_registry.cc
@@ -480,7 +480,7 @@ fhandler_registry::open (path_conv *pc, int flags, mode_t mode)
success:
res = 1;
- set_flags (flags & ~O_TEXT, O_BINARY);
+ set_flags ((flags & ~O_TEXT) | O_BINARY);
set_open_status ();
out:
if (hKey != (HKEY) INVALID_HANDLE_VALUE)