diff options
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c index c3a5c8c5dd..13642afa27 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -764,9 +764,8 @@ rb_w32_pipe_exec(const char *cmd, const char *prog, int mode, int *pipe, reading = TRUE; writing = FALSE; } - mode &= ~(O_RDWR|O_RDONLY|O_WRONLY); - if (!(mode & O_BINARY)) - mode |= O_TEXT; + mode &= ~(O_RDWR|O_RDONLY|O_WRONLY|O_TEXT); + mode |= O_BINARY; sa.nLength = sizeof (SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = NULL; |