diff options
author | Steve Slaven <bpk@hoopajoo.net> | 2006-02-02 21:34:46 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2006-02-02 21:34:46 (GMT) |
commit | a0db2c2d8131162d4df09a81d6c61cb7fc836a04 (patch) | |
tree | d6178426b24bb040a771981085675111b6033a1d | |
parent | 03a51c81d204a8869710bd587d1e0e5f99eea3db (diff) | |
download | powwow-a0db2c2d8131162d4df09a81d6c61cb7fc836a04.zip powwow-a0db2c2d8131162d4df09a81d6c61cb7fc836a04.tar.gz powwow-a0db2c2d8131162d4df09a81d6c61cb7fc836a04.tar.bz2 |
Fixes crash if non-latin-1 character is entered before connecting to a
server (Dain)
-rw-r--r-- | main.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -1316,7 +1316,10 @@ static void get_user_input __P0 (void) while ((j = tty_read(c, chunk)) < 0 && errno == EINTR) ; - if (j <= 0 || (chunk == 1 && j != chunk)) + if (j == 0) + return; + + if (j < 0 || (chunk == 1 && j != chunk)) syserr("read from tty"); c[chunk] = '\0'; |