From c3288296109762807dffa766e1a4c0bfa5a210cb Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 9 Oct 2014 22:55:28 -0400 Subject: [PATCH] Fix out of bounds error in SaveCharacterLeadershipAAs --- zone/zonedb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 7815b5b96..1ba36c5fd 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -1295,7 +1295,7 @@ bool ZoneDatabase::SaveCharacterPotionBelt(uint32 character_id, uint8 potion_id, bool ZoneDatabase::SaveCharacterLeadershipAA(uint32 character_id, PlayerProfile_Struct* pp){ uint8 first_entry = 0; std::string query = ""; - for (int i = 0; i <= MAX_LEADERSHIP_AA_ARRAY; i++){ + for (int i = 0; i < MAX_LEADERSHIP_AA_ARRAY; i++){ if (pp->leader_abilities.ranks[i] > 0){ if (first_entry != 1){ query = StringFormat("REPLACE INTO `character_leadership_abilities` (id, slot, rank) VALUES (%i, %u, %u)", character_id, i, pp->leader_abilities.ranks[i]);