- fixed cheat args parser.

Fixes 139
This commit is contained in:
Christoph Oelckers 2020-08-10 20:18:21 +02:00
parent f6162899de
commit ddf238ff19
1 changed files with 1 additions and 1 deletions

View File

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