[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:
blueboy 2010-11-07 22:02:21 +03:00 committed by VladimirMangos
parent 10d3d3ce24
commit ee8cc71e38
16 changed files with 46 additions and 43 deletions

View file

@ -635,7 +635,7 @@ void InstanceSaveManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficulty, b
// calculate the next reset time
time_t next_reset = InstanceResetScheduler::CalculateNextResetTime(mapDiff, now + timeLeft);
// update it in the DB
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%d' AND difficulty = '%d'", (uint64)next_reset, mapid, difficulty);
CharacterDatabase.PExecute("UPDATE instance_reset SET resettime = '"UI64FMTD"' WHERE mapid = '%u' AND difficulty = '%u'", (uint64)next_reset, mapid, difficulty);
}
// note: this isn't fast but it's meant to be executed very rarely