public: remove Q_sprintf, and patch all code that used it to use Q_snprintf instead

This commit is contained in:
Alibek Omarov
2023-04-23 22:56:05 +03:00
parent b16fa8eddc
commit 8f207362a5
13 changed files with 53 additions and 57 deletions

View File

@@ -769,7 +769,7 @@ void GAME_EXPORT Host_Error( const char *error, ... )
recursive = true;
Q_strncpy( hosterror2, hosterror1, MAX_SYSPATH );
host.errorframe = host.framecount; // to avoid multply calls per frame
Q_sprintf( host.finalmsg, "Server crashed: %s", hosterror1 );
Q_snprintf( host.finalmsg, sizeof( host.finalmsg ), "Server crashed: %s", hosterror1 );
// clearing cmd buffer to prevent execute any commands
COM_InitHostState();