public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix a bug from comparison between int and DWORD.
@ 2022-03-02  2:16 Takashi Yano
  0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-03-02  2:16 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c9f30df71885f92c96c1a673b1cc3e87ffcbbaf2

commit c9f30df71885f92c96c1a673b1cc3e87ffcbbaf2
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Wed Mar 2 11:08:27 2022 +0900

    Cygwin: console: Fix a bug from comparison between int and DWORD.

Diff:
---
 winsup/cygwin/fhandler_console.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/winsup/cygwin/fhandler_console.cc b/winsup/cygwin/fhandler_console.cc
index 472485106..5840e5530 100644
--- a/winsup/cygwin/fhandler_console.cc
+++ b/winsup/cygwin/fhandler_console.cc
@@ -1272,7 +1272,7 @@ out:
     {
       DWORD discarded;
       ReadConsoleInputW (get_handle (), input_rec, discard_len, &discarded);
-      con.num_processed = max (con.num_processed - discarded, 0);
+      con.num_processed -= min (con.num_processed, discarded);
     }
   return stat;
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-02  2:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-02  2:16 [newlib-cygwin/cygwin-3_3-branch] Cygwin: console: Fix a bug from comparison between int and DWORD Takashi Yano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).