aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/inventory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp
index 2f6b5ac7a1..5a1baa6ace 100644
--- a/engines/parallaction/inventory.cpp
+++ b/engines/parallaction/inventory.cpp
@@ -265,8 +265,12 @@ ItemPosition Inventory::addItem(ItemName name, uint32 value) {
if (_numItems == INVENTORY_MAX_ITEMS)
return -1;
+ // NOTE: items whose name == 0 aren't really inventory items,
+ // but the engine expects the inventory to accept them as valid.
+ // This nasty trick has been discovered because of regression
+ // after r29060.
if (name == 0)
- return -1;
+ return 0;
_items[_numItems]._id = value;
_items[_numItems]._index = name;