From eada8c6822ab2c2cd9b619cb3c6c3015c77119c3 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Sun, 23 Apr 2017 18:05:41 +0200 Subject: [PATCH] Fix wrong incrementation in InventoryStore::visitEffectSources (Fixes #3838) --- apps/openmw/mwworld/inventorystore.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index 44e62c755..fd7cb5d74 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -824,7 +824,7 @@ void MWWorld::InventoryStore::visitEffectSources(MWMechanics::EffectSourceVisito int i=0; for (std::vector::const_iterator effectIt (enchantment.mEffects.mList.begin()); - effectIt!=enchantment.mEffects.mList.end(); ++effectIt) + effectIt!=enchantment.mEffects.mList.end(); ++effectIt, ++i) { // Don't get spell icon display information for enchantments that weren't actually applied if (mMagicEffects.get(MWMechanics::EffectKey(*effectIt)).getMagnitude() == 0) @@ -834,8 +834,6 @@ void MWWorld::InventoryStore::visitEffectSources(MWMechanics::EffectSourceVisito magnitude *= params.mMultiplier; if (magnitude > 0) visitor.visit(MWMechanics::EffectKey(*effectIt), (**iter).getClass().getName(**iter), (**iter).getCellRef().getRefId(), -1, magnitude); - - ++i; } } }