]> git.ipfire.org Git - thirdparty/newt.git/blobdiff - whiptail.c
check for zero menu/list height in whiptail
[thirdparty/newt.git] / whiptail.c
index 773793a795412b16eff1692f4d828f796180832b..0dd60a71dcac4f10904ac3c0cb59c6f2d5b4141f 100644 (file)
@@ -328,7 +328,7 @@ int main(int argc, const char ** argv) {
     char * end;
     int height;
     int width;
-    int listHeight = 0;
+    int listHeight = 1;
     int fd = -1;
     int needSpace = 0;
     int noCancel = 0;
@@ -523,7 +523,7 @@ int main(int argc, const char ** argv) {
 
     cleanNewlines(text);
 
-    if ( height <= 0 || width <= 0 )
+    if (height <= 0 || width <= 0 || listHeight <= 0)
        guessSize(&height, &width, &listHeight, mode, &flags, fullButtons,
                 title, text, optCon);