From 470486ba7e60867920bad014d25c46bb2ba75473 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 12 Dec 2018 23:30:27 -0800 Subject: [PATCH] Don't double-format in ReplyToCommand. (#932) --- core/logic/smn_console.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/logic/smn_console.cpp b/core/logic/smn_console.cpp index 3e70321c..5ee26926 100644 --- a/core/logic/smn_console.cpp +++ b/core/logic/smn_console.cpp @@ -267,8 +267,7 @@ static cell_t ReplyToCommand(IPluginContext *pContext, const cell_t *params) size_t len; { DetectExceptions eh(pContext); - g_pSM->FormatString(buffer, sizeof(buffer), pContext, params, 2); - len = g_pSM->FormatString(buffer, sizeof(buffer) - 2, pContext, params, 2); + len = g_pSM->FormatString(buffer, sizeof(buffer) - 1, pContext, params, 2); if (eh.HasException()) return 0; }