From: ewt Date: Mon, 17 Aug 1998 15:38:44 +0000 (+0000) Subject: check for vsnprintf() returning -1 X-Git-Tag: r0-30~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6e545bb556c7d9309350afce9e8b4165ede5d88e;p=thirdparty%2Fnewt.git check for vsnprintf() returning -1 --- diff --git a/windows.c b/windows.c index e9d607d..369e70a 100644 --- 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) {