From e20a0212b05228940b6e6a05c3c20ca6ae35dfc4 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 26 Oct 2014 20:48:21 +0100 Subject: Core/AH: Fix build Fix build caused by 4.3.4 dbcs not having locales in ItemRandom*.dbcs . Fix a buffer overflow trying to access a char* as char** --- src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp index 179c0daae9f..9e899d788cd 100644 --- a/src/server/game/AuctionHouse/AuctionHouseMgr.cpp +++ b/src/server/game/AuctionHouse/AuctionHouseMgr.cpp @@ -535,7 +535,6 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player uint32& count, uint32& totalcount) { int loc_idx = player->GetSession()->GetSessionDbLocaleIndex(); - int locdbc_idx = player->GetSession()->GetSessionDbcLocale(); time_t curTime = sWorld->GetGameTime(); @@ -594,7 +593,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player // These are found in ItemRandomSuffix.dbc and ItemRandomProperties.dbc // even though the DBC names seem misleading - char* const* suffix = nullptr; + const char* suffix = nullptr; if (propRefID < 0) { @@ -615,7 +614,7 @@ void AuctionHouseObject::BuildListAuctionItems(WorldPacket& data, Player* player // Append the suffix (ie: of the Monkey) to the name using localization // or default enUS if localization is invalid name += ' '; - name += suffix[locdbc_idx >= 0 ? locdbc_idx : LOCALE_enUS]; + name += suffix; } } -- cgit v1.2.3