From 8f8b2ed003f9ba998ab4717fad533a2bc8ae1369 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 1 Dec 2017 19:58:11 +0100 Subject: FULLPIPE: Fix bug #9672: "Several inventory items highlighted at the same time" --- engines/fullpipe/inventory.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'engines') 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() { -- cgit v1.2.3