From 5f9a4dd7e13f2d423731c3bd30bcf9118d0132d5 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Sat, 17 May 2025 11:39:35 +0200 Subject: [PATCH] [GEN][ZH] Fix missing call to va_end in InGameUI::messageColor() --- Generals/Code/GameEngine/Source/GameClient/InGameUI.cpp | 1 + GeneralsMD/Code/GameEngine/Source/GameClient/InGameUI.cpp | 1 + 2 files changed, 2 insertions(+) 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 ) {