diff options
Diffstat (limited to 'src/game/Level1.cpp')
-rw-r--r-- | src/game/Level1.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/game/Level1.cpp b/src/game/Level1.cpp index 650084e7557..d52a6854328 100644 --- a/src/game/Level1.cpp +++ b/src/game/Level1.cpp @@ -2860,6 +2860,11 @@ bool ChatHandler::HandleGoZoneXYCommand(const char* args) float x = (float)atof(px); float y = (float)atof(py); + + // prevent accept wrong numeric args + if (x==0.0f && *px!='0' || y==0.0f && *py!='0') + return false; + uint32 areaid = cAreaId ? (uint32)atoi(cAreaId) : _player->GetZoneId(); AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaid); |