From 494e09ba927ec3475c55a1a6658c4714ea0a101b Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 28 Mar 2009 16:13:33 -0600 Subject: [7554] Prevent accepting wrong numeric args as 0.0f in .go zone command Author: VladimirMangos --HG-- branch : trunk --- src/game/Level1.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') 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); -- cgit v1.2.3