summaryrefslogtreecommitdiff
path: root/src/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tty.c')
-rw-r--r--src/tty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tty.c b/src/tty.c
index ed951b3..0d53797 100644
--- a/src/tty.c
+++ b/src/tty.c
@@ -90,6 +90,7 @@ char tty_getchar(tty_t *tty) {
int tty_input_ready(tty_t *tty) {
fd_set readfs;
struct timeval tv = {0, 0};
+ FD_ZERO(&readfs);
FD_SET(tty->fdin, &readfs);
select(tty->fdin + 1, &readfs, NULL, NULL, &tv);
return FD_ISSET(tty->fdin, &readfs);