mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[10692] Fixed wrongly use %d for guids in DB queries.
This can affect correct result in cases big guid values (out of range for possitive part of int32 range) at x86 platforms. Some other cases addded in addition to original patch fixes where %d wrongly/unsafe used for unsigned values. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
10d3d3ce24
commit
ee8cc71e38
16 changed files with 46 additions and 43 deletions
|
|
@ -461,7 +461,9 @@ void WaypointManager::AddAfterNode(uint32 id, uint32 point, float x, float y, fl
|
|||
void WaypointManager::_addNode(uint32 id, uint32 point, float x, float y, float z, float o, uint32 delay, uint32 wpGuid)
|
||||
{
|
||||
if(point == 0) return; // counted from 1 in the DB
|
||||
WorldDatabase.PExecuteLog("INSERT INTO creature_movement (id,point,position_x,position_y,position_z,orientation,wpguid,waittime) VALUES ('%u','%u','%f', '%f', '%f', '%f', '%d', '%d')", id, point, x, y, z, o, wpGuid, delay);
|
||||
WorldDatabase.PExecuteLog("INSERT INTO creature_movement (id,point,position_x,position_y,position_z,orientation,wpguid,waittime) "
|
||||
"VALUES ('%u','%u','%f', '%f', '%f', '%f', '%u', '%u')",
|
||||
id, point, x, y, z, o, wpGuid, delay);
|
||||
WaypointPathMap::iterator itr = m_pathMap.find(id);
|
||||
if(itr == m_pathMap.end())
|
||||
itr = m_pathMap.insert(WaypointPathMap::value_type(id, WaypointPath())).first;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue