Don't double-format in ReplyToCommand. (#932)

This commit is contained in:
David Anderson 2018-12-12 23:30:27 -08:00 committed by GitHub
parent 9a4fe1c475
commit 470486ba7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}