[/trunk] Changeset 179 by mikael
* Fix a crash when resized too small.
--- 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
--- 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);