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.
This commit is contained in:
Not
2026-01-14 10:41:56 -07:00
committed by GitHub
parent 6b97c379ba
commit 2ab73c1fd5

View File

@@ -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 += "|";