diff options
| author | Quentin Carbonneaux | 2012-03-11 23:54:14 +0100 |
|---|---|---|
| committer | Quentin Carbonneaux | 2012-03-11 23:54:14 +0100 |
| commit | 110c0a8075a87cf1991233c158ad51fe69e48e2a (patch) | |
| tree | 216aeda85b3753cbb7268e4be7eeda8e39f0f705 | |
| parent | 7242e2cc4b68ca55086a26cb57139a9b29470bbf (diff) | |
Test the result of ioctl (TIOCGWINSZ).
| -rw-r--r-- | irc.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -351,7 +351,8 @@ tresize(void) struct winsize ws; winchg=0; - ioctl(0, TIOCGWINSZ, &ws); + if (ioctl(0, TIOCGWINSZ, &ws)<0) + panic("Ioctl (TIOCGWINSZ) failed."); resizeterm(scr.y=ws.ws_row, scr.x=ws.ws_col); if (scr.y<3 || scr.x<10) panic("Screen too small."); |
