* Use snprintf (in vasprintf) to determine the size of the string we're about to construct

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2807 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-11-11 22:09:20 +00:00
parent be25c4901b
commit 1bd1483944
1 changed files with 1 additions and 1 deletions

View File

@ -28,7 +28,7 @@ int vasprintf(char** strp, const char* format, va_list ap)
int count;
// Find out how long the resulting string is
count = _vscprintf(format, ap);
count = snprintf(NULL, 0, format, ap);
if (count == 0)
{