diff --git a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp index c9cd4de191..bd191aaff0 100644 --- a/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp @@ -2025,6 +2025,7 @@ void InGameUI::messageColor( const RGBColor *rgbColor, UnicodeString format, ... va_start( args, format ); WideChar buf[ UnicodeString::MAX_FORMAT_BUF_LEN ]; int result = _vsnwprintf(buf, sizeof( buf )/sizeof( WideChar ) - 1, format.str(), args ); + va_end(args); if( result >= 0 ) { diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp index 5124197fb8..d43cd68030 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp @@ -2081,6 +2081,7 @@ void InGameUI::messageColor( const RGBColor *rgbColor, UnicodeString format, ... va_start( args, format ); WideChar buf[ UnicodeString::MAX_FORMAT_BUF_LEN ]; int result = _vsnwprintf(buf, sizeof( buf )/sizeof( WideChar ) - 1, format.str(), args ); + va_end(args); if( result >= 0 ) {