diff options
author | megamage <none@none> | 2009-03-28 16:13:33 -0600 |
---|---|---|
committer | megamage <none@none> | 2009-03-28 16:13:33 -0600 |
commit | 494e09ba927ec3475c55a1a6658c4714ea0a101b (patch) | |
tree | 55add2a6122ee508362c7d3a05782ee324b34c94 /src | |
parent | eb894f39e8e05cfe2f266107da4410d19558ff80 (diff) |
[7554] Prevent accepting wrong numeric args as 0.0f in .go zone command Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src')
-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); |