commit | 4de93471f896d07227481034c56c5b40fae11670 | [log] [tgz] |
---|---|---|
author | Lee Thomason <leethomason@gmail.com> | Tue Mar 13 17:33:35 2012 -0700 |
committer | Lee Thomason <leethomason@gmail.com> | Tue Mar 13 17:33:35 2012 -0700 |
tree | 755077cdbd0029a2b9a66fec08d9c3921056cbf0 | |
parent | ea09bd065bc2ee1e5329ceac682da9289b576f8f [diff] [blame] |
Apply a fix from DoDoEnt for 64 bit linux systems where var args would crash
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index ff974ec..68b8fa8 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1523,6 +1523,9 @@ 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