Fix server crash due to incorrect SQL parameter bindings.

This references issue https://www.getmangos.eu/issue.php?issueid=961
This commit is contained in:
H0zen 2015-11-10 15:43:59 +02:00
parent 590f758bd2
commit 3d7be378f4

View File

@ -2751,12 +2751,12 @@ void ObjectMgr::FlushRankPoints(uint32 dateTop)
if (type == HONORABLE)
{
SqlStatement stmt = CharacterDatabase.CreateStatement(updHonorable, "UPDATE characters SET stored_honorable_kills = stored_honorable_kills + %u WHERE guid = %u");
SqlStatement stmt = CharacterDatabase.CreateStatement(updHonorable, "UPDATE characters SET stored_honorable_kills = (stored_honorable_kills + ?) WHERE guid = ?");
stmt.PExecute(kills, guid);
}
else if (type == DISHONORABLE)
{
SqlStatement stmt = CharacterDatabase.CreateStatement(updDishonorable, "UPDATE characters SET stored_dishonorable_kills = stored_dishonorable_kills + %u WHERE guid = %u");
SqlStatement stmt = CharacterDatabase.CreateStatement(updDishonorable, "UPDATE characters SET stored_dishonorable_kills = (stored_dishonorable_kills + ?) WHERE guid = ?");
stmt.PExecute(kills, guid);
}
}