diff --git a/zone/zonedb.cpp b/zone/zonedb.cpp index 995fa0439..cf3542729 100755 --- a/zone/zonedb.cpp +++ b/zone/zonedb.cpp @@ -3303,7 +3303,8 @@ void ZoneDatabase::SavePetInfo(Client *client) // build pet buffs into struct int pet_buff_count = 0; - int max_slots = RuleI(Spells, MaxTotalSlotsPET); + // Guard against setting the maximum pet slots above the client allowed maximum. + int max_slots = RuleI(Spells, MaxTotalSlotsPET) > PET_BUFF_COUNT ? PET_BUFF_COUNT : RuleI(Spells, MaxTotalSlotsPET); // count pet buffs for (int index = 0; index < max_slots; index++) {