From 87cc2c4ceb434cfdd769edd7a99db8021fa8c740 Mon Sep 17 00:00:00 2001 From: kevin Date: Thu, 21 Mar 2013 12:06:03 -0700 Subject: [PATCH] cmTsVPrintfP.c: cmTsVPrintfP() added assert(). --- cmText.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmText.c b/cmText.c index fd0fe35..d2c9d2c 100644 --- a/cmText.c +++ b/cmText.c @@ -208,7 +208,8 @@ cmChar_t* cmTsVPrintfP( cmChar_t* s, const cmChar_t* fmt, va_list vl ) va_list vl1; va_copy(vl1,vl); - unsigned n = vsnprintf(NULL,0,fmt,vl); + int n = vsnprintf(NULL,0,fmt,vl); + assert(n != -1); s = cmMemResize(cmChar_t,s,n+1);