Explorar o código

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

Lee Thomason %!s(int64=14) %!d(string=hai) anos
pai
achega
4de93471f8
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      tinyxml2.cpp

+ 3 - 0
tinyxml2.cpp

@@ -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