From d68bbeb5efc0ecefe9e86ce4323661c5c282cee4 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 13 May 2002 17:11:04 +0000 Subject: [PATCH] don't use TIOCGWINSZ terminal size if it returns only 0x0. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2788 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/fe-text/term.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fe-text/term.c b/src/fe-text/term.c index 94d81cfd..03004b10 100644 --- a/src/fe-text/term.c +++ b/src/fe-text/term.c @@ -56,6 +56,9 @@ int term_get_size(int *width, int *height) if (ioctl(0, TIOCGWINSZ, &ws) < 0) return FALSE; + if (ws.ws_row == 0 && ws.ws_col == 0) + return FALSE; + *width = ws.ws_col; *height = ws.ws_row;