diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-10-26 20:48:21 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-10-26 20:48:21 +0100 |
commit | e20a0212b05228940b6e6a05c3c20ca6ae35dfc4 (patch) | |
tree | 533604b266fbc9f84128a1944310c9c20450d466 | |
parent | 5a02018836344610e2dbcb27d8fd47f714350f4e (diff) |
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**
-rw-r--r-- | src/server/game/AuctionHouse/AuctionHouseMgr.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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; } } |