[11038] Small crash-fix in commands handling.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Feanordev 2011-01-18 16:41:22 +03:00 committed by VladimirMangos
parent a6ea82682d
commit 3293a4c3f5
2 changed files with 4 additions and 1 deletions

View file

@ -1929,6 +1929,9 @@ bool ChatHandler::HandleNpcSetMoveTypeCommand(char* args)
MovementGeneratorType move_type;
char* type_str = ExtractLiteralArg(&args);
if (!type_str)
return false;
if (strncmp(type_str, "stay", strlen(type_str)) == 0)
move_type = IDLE_MOTION_TYPE;
else if (strncmp(type_str, "random", strlen(type_str)) == 0)