Browse Source

cmTsVPrintfP.c: cmTsVPrintfP() added assert().

master
kevin 11 years ago
parent
commit
87cc2c4ceb
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      cmText.c

+ 2
- 1
cmText.c View File

@@ -208,7 +208,8 @@ cmChar_t* cmTsVPrintfP( cmChar_t* s, const cmChar_t* fmt, va_list vl )
208 208
   va_list     vl1;
209 209
   va_copy(vl1,vl);
210 210
 
211
-  unsigned     n = vsnprintf(NULL,0,fmt,vl);
211
+  int     n = vsnprintf(NULL,0,fmt,vl);
212
+  assert(n != -1);
212 213
 
213 214
   s = cmMemResize(cmChar_t,s,n+1);
214 215
   

Loading…
Cancel
Save