mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7554] Prevent accepting wrong numeric args as 0.0f in .go zone command
This commit is contained in:
parent
b768401438
commit
cc19245ce4
2 changed files with 6 additions and 1 deletions
|
|
@ -2432,6 +2432,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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue