From ddf238ff1986ec859cc8a81c2d0a1eb500868037 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 10 Aug 2020 20:18:21 +0200 Subject: [PATCH] - fixed cheat args parser. Fixes 139 --- source/blood/src/messages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blood/src/messages.cpp b/source/blood/src/messages.cpp index af07499ee..248b72e5a 100644 --- a/source/blood/src/messages.cpp +++ b/source/blood/src/messages.cpp @@ -365,7 +365,7 @@ bool bPlayerCheated = false; static int parseArgs(char *pzArgs, int *nArg1, int *nArg2) { - if (!nArg1 || !nArg2) + if (!nArg1 || !nArg2 || strlen(pzArgs) < 3) return -1; *nArg1 = pzArgs[0] - '0' - 1; *nArg2 = (pzArgs[1] - '0')*10+(pzArgs[2]-'0') - 1;