cmTsVPrintfP.c: cmTsVPrintfP() added assert().
This commit is contained in:
parent
6f04687939
commit
87cc2c4ceb
3
cmText.c
3
cmText.c
@ -208,7 +208,8 @@ cmChar_t* cmTsVPrintfP( cmChar_t* s, const cmChar_t* fmt, va_list vl )
|
|||||||
va_list vl1;
|
va_list vl1;
|
||||||
va_copy(vl1,vl);
|
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);
|
s = cmMemResize(cmChar_t,s,n+1);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user