From 2ab73c1fd58ae7df0287ce9a5ba5728cc644b52a Mon Sep 17 00:00:00 2001 From: Not Date: Wed, 14 Jan 2026 10:41:56 -0700 Subject: [PATCH] Fix deprecated vsprintf usage in Engine logging 2nd edition (#1978) Replace deprecated vsprintf with vsnprintf to eliminate compiler warning and prevent potential buffer overflow. Updated to latest commit. Tested in game and it seemed to log actions just fine. I just basically added a buffer size by using the current vsnprintf lib instead. --- src/strategy/Engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/strategy/Engine.cpp b/src/strategy/Engine.cpp index 27adcd8b..76350375 100644 --- a/src/strategy/Engine.cpp +++ b/src/strategy/Engine.cpp @@ -606,7 +606,7 @@ void Engine::LogAction(char const* format, ...) va_list ap; va_start(ap, format); - vsprintf(buf, format, ap); + vsnprintf(buf, sizeof(buf), format, ap); va_end(ap); lastAction += "|";