mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/Misc: Fixed array out of bounds access when loading locales_achievement_reward, locales_creature_text, locales_gossip_menu_option and skip LOCALE_none when iterating over locales
This commit is contained in:
@@ -185,7 +185,7 @@ void CreatureTextMgr::LoadCreatureTextLocales()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
CreatureTextLocale& loc = mLocaleTextMap[CreatureTextId(fields[0].GetUInt32(), uint32(fields[1].GetUInt8()), uint32(fields[2].GetUInt8()))];
|
||||
for (uint8 i = TOTAL_LOCALES - 1; i > 0; --i)
|
||||
for (uint8 i = OLD_TOTAL_LOCALES - 1; i > 0; --i)
|
||||
{
|
||||
LocaleConstant locale = LocaleConstant(i);
|
||||
ObjectMgr::AddLocaleString(fields[3 + i - 1].GetString(), locale, loc.Text);
|
||||
|
||||
Reference in New Issue
Block a user