From 407abc605f17bb7b6e84fa33f8d4ba5c66149fe4 Mon Sep 17 00:00:00 2001 From: MiroslavR Date: Wed, 19 Oct 2016 22:37:45 +0200 Subject: [PATCH] Fix auto-equipping of blunt weapons --- apps/openmw/mwworld/inventorystore.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/inventorystore.cpp b/apps/openmw/mwworld/inventorystore.cpp index cf2a88c1d..98cbad742 100644 --- a/apps/openmw/mwworld/inventorystore.cpp +++ b/apps/openmw/mwworld/inventorystore.cpp @@ -343,12 +343,12 @@ void MWWorld::InventoryStore::autoEquip (const MWWorld::Ptr& actor) bool weaponSkillVisited[weaponSkillsLength] = { false }; - for (int i = 0; i < static_cast(weaponSkillsLength) - 1; ++i) + for (int i = 0; i < static_cast(weaponSkillsLength); ++i) { int max = 0; int maxWeaponSkill = -1; - for (int j = 0; j < static_cast(weaponSkillsLength) - 1; ++j) + for (int j = 0; j < static_cast(weaponSkillsLength); ++j) { int skillValue = stats.getSkill(static_cast(weaponSkills[j])).getModified();