aboutsummaryrefslogtreecommitdiff
path: root/engines/fullpipe
diff options
context:
space:
mode:
Diffstat (limited to 'engines/fullpipe')
-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() {