aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2018-03-31 12:49:54 -0400
committerPaul Gilbert2018-03-31 12:49:54 -0400
commit3806a4a0f6587223b076b2249d905da0d554c4d0 (patch)
treea5f8d88f58b8593096913c48eafe151c04fb72a4
parent31bcb0961981e3e647b2de912927145e8e9429aa (diff)
downloadscummvm-rg350-3806a4a0f6587223b076b2249d905da0d554c4d0.tar.gz
scummvm-rg350-3806a4a0f6587223b076b2249d905da0d554c4d0.tar.bz2
scummvm-rg350-3806a4a0f6587223b076b2249d905da0d554c4d0.zip
XEEN: Fix implementation of hasCursedItems method
-rw-r--r--engines/xeen/item.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/xeen/item.cpp b/engines/xeen/item.cpp
index c52f4e998b..091afb31f6 100644
--- a/engines/xeen/item.cpp
+++ b/engines/xeen/item.cpp
@@ -743,13 +743,14 @@ void InventoryItemsGroup::curseUncurse(bool curse) {
}
bool InventoryItemsGroup::hasCursedItems() const {
- bool isCursed = false;
for (int idx = 0; idx < INV_ITEMS_TOTAL; ++idx) {
for (ItemCategory cat = CATEGORY_WEAPON; cat <= CATEGORY_MISC; cat = (ItemCategory)((int)cat + 1)) {
if ((*this)[cat][idx]._state._cursed)
return true;
}
}
+
+ return false;
}
} // End of namespace Xeen