mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +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 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);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7553"
|
#define REVISION_NR "7554"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue