diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Commands/cs_misc.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index aaa4d1c3f68..2c9623b23a6 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -953,13 +953,12 @@ public: if (!player_str) return false; - std::string location_str = strtok(NULL, ""); - if (location_str.empty()) - location_str = "inn"; + std::string location_str = "inn"; + if (char const* loc = strtok(NULL, " ")) + location_str = loc; Player* player = NULL; - std::string playerName; - if (!handler->extractPlayerTarget((char*)player_str, &player, NULL, &playerName)) + if (!handler->extractPlayerTarget(player_str, &player)) return false; if (player->isInFlight() || player->isInCombat()) |