[7554] Prevent accepting wrong numeric args as 0.0f in .go zone command Author: VladimirMangos
--HG-- branch : trunk
This commit is contained in:
@@ -2860,6 +2860,11 @@ bool ChatHandler::HandleGoZoneXYCommand(const char* args)
|
|||||||
|
|
||||||
float x = (float)atof(px);
|
float x = (float)atof(px);
|
||||||
float y = (float)atof(py);
|
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();
|
uint32 areaid = cAreaId ? (uint32)atoi(cAreaId) : _player->GetZoneId();
|
||||||
|
|
||||||
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaid);
|
AreaTableEntry const* areaEntry = GetAreaEntryByAreaID(areaid);
|
||||||
|
|||||||
Reference in New Issue
Block a user