From d0ce95fca5d3661a35ae500f3c57f676e459a926 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Wed, 26 Aug 2015 22:59:03 +0200 Subject: Core/Battleground: Fix issue reported by static analysis Coverity defect IDs: 1193415 (cherry picked from commit c67118f909fee1ed489e3125cb85f3a8179c1a43) --- src/server/game/Battlegrounds/BattlegroundMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index bbd7acacf12..74a9ac32b1b 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -716,7 +716,8 @@ void BattlegroundMgr::ToggleArenaTesting() void BattlegroundMgr::SetHolidayWeekends(uint32 mask) { - for (uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID; ++bgtype) + // The current code supports battlegrounds up to BattlegroundTypeId(31) + for (uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID && bgtype < 32; ++bgtype) if (Battleground* bg = GetBattlegroundTemplate(BattlegroundTypeId(bgtype))) bg->SetHoliday((mask & (1 << bgtype)) != 0); } -- cgit v1.2.3