Apply a fix from DoDoEnt for 64 bit linux systems where var args would crash

This commit is contained in:
Lee Thomason 2012-03-13 17:33:35 -07:00
parent ea09bd065b
commit 4de93471f8
1 changed files with 3 additions and 0 deletions

View File

@ -1523,6 +1523,9 @@ void XMLPrinter::Print( const char* format, ... )
memcpy( p, accumulator.Mem(), len+1 );
#else
int len = vsnprintf( 0, 0, format, va );
// Close out and re-start the va-args
va_end( va );
va_start( va, format );
char* p = buffer.PushArr( len ) - 1;
vsnprintf( p, len+1, format, va );
#endif