# HG changeset patch # User mikael # Date 1115228560 0 # Node ID a6ac5498d254188360933fef66bc5b367d686be7 # Parent aa5b635520ef0bd3c06ccabfd28836929de068ac [/trunk] Changeset 179 by mikael * Fix a crash when resized too small. diff -r aa5b635520ef -r a6ac5498d254 mcabber/src/TODO --- a/mcabber/src/TODO Wed May 04 17:11:59 2005 +0000 +++ b/mcabber/src/TODO Wed May 04 17:42:40 2005 +0000 @@ -1,7 +1,6 @@ BUGS: -* Check if it crashes when resized too small... Can we have a minimum size? * Colors are misnamed diff -r aa5b635520ef -r a6ac5498d254 mcabber/src/screen.c --- a/mcabber/src/screen.c Wed May 04 17:11:59 2005 +0000 +++ b/mcabber/src/screen.c Wed May 04 17:42:40 2005 +0000 @@ -421,6 +421,8 @@ ParseColors(); getmaxyx(stdscr, maxY, maxX); + if (maxY < LOG_WIN_HEIGHT+2) + maxY = LOG_WIN_HEIGHT+2; inputLine[0] = 0; ptr_inputline = inputLine; @@ -524,6 +526,8 @@ // First, update the global variables getmaxyx(stdscr, maxY, maxX); + if (maxY < LOG_WIN_HEIGHT+2) + maxY = LOG_WIN_HEIGHT+2; // Make sure the cursor stays inside the window check_offset(0);