mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11038] Small crash-fix in commands handling.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
a6ea82682d
commit
3293a4c3f5
2 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue