diff options
author | Jason Felice <jason.m.felice@gmail.com> | 2018-05-04 11:42:34 -0400 |
---|---|---|
committer | Jason Felice <jason.m.felice@gmail.com> | 2018-05-04 11:42:34 -0400 |
commit | 39ce2809029e3273ed212d9b31ffa350f12d521c (patch) | |
tree | 26dd937e5944a12fb0780e371378b74788edbc0d /src | |
parent | 2be07b5ff2ee92eebbc5984dbbb5d98d3270e318 (diff) |
Initialize fd_set correctly
Diffstat (limited to 'src')
-rw-r--r-- | src/tty.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); |