Skip to content

Commit 8f25c22

Browse files
authored
Fix debugscript setting to 0 when using invalid characters (#1602)
1 parent 9617517 commit 8f25c22

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Server/mods/deathmatch/logic/CConsoleCommands.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,6 +1234,11 @@ bool CConsoleCommands::DebugScript(CConsole* pConsole, const char* szArguments,
12341234

12351235
// Convert to number
12361236
int iLevel = atoi(szArguments);
1237+
if (iLevel == 0 && strcmp(szArguments, "0") != 0)
1238+
{
1239+
pEchoClient->SendEcho("debugscript: Syntax is 'debugscript <mode>'");
1240+
return false;
1241+
}
12371242
if (iLevel != (int)pPlayer->GetScriptDebugLevel())
12381243
{
12391244
// Between 0 and 3?

0 commit comments

Comments
 (0)