aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--win32/termios.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/win32/termios.c b/win32/termios.c
index 45d4e7740..7d390ce09 100644
--- a/win32/termios.c
+++ b/win32/termios.c
@@ -21,6 +21,7 @@ int64_t FAST_FUNC read_key(int fd, char *buf UNUSED_PARAM, int timeout)
21 SetConsoleMode(cin, 0); 21 SetConsoleMode(cin, 0);
22 22
23 while (1) { 23 while (1) {
24 errno = 0;
24 if (timeout > 0) { 25 if (timeout > 0) {
25 if (WaitForSingleObject(cin, timeout) != WAIT_OBJECT_0) 26 if (WaitForSingleObject(cin, timeout) != WAIT_OBJECT_0)
26 goto done; 27 goto done;