diff options
-rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index a39a56674..6c00d6112 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -767,7 +767,7 @@ fhandler_pty_slave::read (void *ptr, size_t& len) return; } - readlen = bytes_in_pipe ? MIN (len, sizeof (buf)) : 0; + readlen = MIN (bytes_in_pipe, MIN (len, sizeof (buf))); #if 0 /* Why on earth is the read length reduced to vmin, even if more bytes |