aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2017-12-01 19:58:11 +0100
committerEugene Sandulenko2017-12-01 19:58:11 +0100
commit8f8b2ed003f9ba998ab4717fad533a2bc8ae1369 (patch)
tree8ab2db505256e823e5ec5684c4a9f9c51dbf08e4 /engines
parent2c19fafa38790b557d1c3a746adb84ff25f17be8 (diff)
downloadscummvm-rg350-8f8b2ed003f9ba998ab4717fad533a2bc8ae1369.tar.gz
scummvm-rg350-8f8b2ed003f9ba998ab4717fad533a2bc8ae1369.tar.bz2
scummvm-rg350-8f8b2ed003f9ba998ab4717fad533a2bc8ae1369.zip
FULLPIPE: Fix bug #9672: "Several inventory items highlighted at the same time"
Diffstat (limited to 'engines')
-rw-r--r--engines/fullpipe/inventory.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/fullpipe/inventory.cpp b/engines/fullpipe/inventory.cpp
index 1a3c234ef6..bba1284ee6 100644
--- a/engines/fullpipe/inventory.cpp
+++ b/engines/fullpipe/inventory.cpp
@@ -465,6 +465,8 @@ int Inventory2::getHoveredItem(Common::Point *point) {
if (!_isInventoryOut)
return 0;
+ int res = 0;
+
for (uint i = 0; i < _inventoryIcons.size(); i++) {
InventoryIcon &icn = _inventoryIcons[i];
if (selId ||
@@ -475,11 +477,11 @@ int Inventory2::getHoveredItem(Common::Point *point) {
icn.isMouseHover = false;
} else {
icn.isMouseHover = true;
- return icn.inventoryItemId;
+ res = icn.inventoryItemId;
}
}
- return 0;
+ return res;
}
void Inventory2::clear() {