From 1b4cc695e0afb6891fafab828a282ea78bc4ec70 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 16:53:02 +0000 Subject: [PATCH 2/2] Fix pet_buffs.reserve to use cumulative size to avoid reallocations Co-authored-by: Valorith <76063792+Valorith@users.noreply.github.com> --- zone/zonedb.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index efb6ce92d..937f14adc 100644 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3168,7 +3168,7 @@ void ZoneDatabase::SavePetInfo(Client *client) pet_buff_count++; } - pet_buffs.reserve(pet_buff_count); + pet_buffs.reserve(pet_buffs.size() + pet_buff_count); for (int slot_id = 0; slot_id < max_slots; slot_id++) { if (!IsValidOrSuppressedSpell(p->Buffs[slot_id].spellid)) {