]> git.ipfire.org Git - thirdparty/newt.git/commitdiff
check for vsnprintf() returning -1
authorewt <ewt>
Mon, 17 Aug 1998 15:38:44 +0000 (15:38 +0000)
committerewt <ewt>
Mon, 17 Aug 1998 15:38:44 +0000 (15:38 +0000)
windows.c

index e9d607db52dd04ea81789970ae8ef7bd6bfcd096..369e70ac21455403f1ce64f1b4eba38123a4eb92 100644 (file)
--- a/windows.c
+++ b/windows.c
@@ -23,7 +23,7 @@ static void * newtvwindow(char * title, char * button1, char * button2,
        if (buf) free(buf);
        buf = malloc(size);
        i = vsnprintf(buf, size, message, args);
-    } while (i == size);
+    } while (i == size || i == -1);
 
     flowedText = newtReflowText(buf, 35, 5, 5, &width, &height);
     if (height > 6) {