From 1609e42d8613f6e7193f68f055be8be5a2e204f3 Mon Sep 17 00:00:00 2001 From: In-line Date: Tue, 25 Apr 2017 18:13:06 +0400 Subject: [PATCH] Use sizeof in PF_stuffcmd_I --- rehlds/engine/pr_cmds.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rehlds/engine/pr_cmds.cpp b/rehlds/engine/pr_cmds.cpp index da94826..9a944dc 100644 --- a/rehlds/engine/pr_cmds.cpp +++ b/rehlds/engine/pr_cmds.cpp @@ -828,7 +828,7 @@ void EXT_FUNC PF_stuffcmd_I(edict_t *pEdict, const char *szFmt, ...) Q_vsnprintf(szOut, sizeof(szOut), szFmt, argptr); va_end(argptr); - szOut[1023] = 0; + szOut[sizeof(szOut) - 1] = 0; if (entnum < 1 || entnum > g_psvs.maxclients) { Con_Printf("\n!!!\n\nStuffCmd: Some entity tried to stuff '%s' to console "