aboutsummaryrefslogtreecommitdiff
path: root/src/game/Level2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Level2.cpp')
-rw-r--r--src/game/Level2.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/game/Level2.cpp b/src/game/Level2.cpp
index b43c4a971f5..8e891626b1c 100644
--- a/src/game/Level2.cpp
+++ b/src/game/Level2.cpp
@@ -4486,10 +4486,8 @@ bool ChatHandler::HandleGOPhaseCommand(const char* args)
return false;
}
- if (!*args)
- return false;
-
- uint32 phasemask = (uint32) atoi((char*)args);
+ char* phaseStr = strtok (NULL, " ");
+ uint32 phasemask = phaseStr? atoi(phaseStr) : 0;
if ( phasemask == 0 )
{
SendSysMessage(LANG_BAD_VALUE);