From 5de5be77f33ea80a7fbb2aeb8a5d68e3c5458361 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 13 Mar 2017 02:42:43 +0100 Subject: [PATCH] Fix Ptr/ConstPtr userdata mismatch (Bug #3784) --- apps/openmw/mwgui/merchantrepair.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwgui/merchantrepair.cpp b/apps/openmw/mwgui/merchantrepair.cpp index 376fc7152..b96873983 100644 --- a/apps/openmw/mwgui/merchantrepair.cpp +++ b/apps/openmw/mwgui/merchantrepair.cpp @@ -44,10 +44,9 @@ void MerchantRepair::startRepair(const MWWorld::Ptr &actor) MWWorld::Ptr player = MWMechanics::getPlayer(); int playerGold = player.getClass().getContainerStore(player).count(MWWorld::ContainerStore::sGoldId); - const MWWorld::ContainerStore& store = player.getClass().getContainerStore(player); + MWWorld::ContainerStore& store = player.getClass().getContainerStore(player); int categories = MWWorld::ContainerStore::Type_Weapon | MWWorld::ContainerStore::Type_Armor; - for (MWWorld::ConstContainerStoreIterator iter (store.cbegin(categories)); - iter!=store.cend(); ++iter) + for (MWWorld::ContainerStoreIterator iter (store.begin(categories)); iter!=store.end(); ++iter) { if (iter->getClass().hasItemHealth(*iter)) {