diff options
author | Nicola Mettifogo | 2007-09-24 19:45:18 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-24 19:45:18 +0000 |
commit | 8e1e4b9079a96d5b48bc445fabd01c4067ba9635 (patch) | |
tree | 8f84ce45e945fea71a6f39a74a82e0ca9f67e2c9 /engines/parallaction/inventory.cpp | |
parent | 5788598f10dea65de3a9bd27831f817cf11bf166 (diff) | |
download | scummvm-rg350-8e1e4b9079a96d5b48bc445fabd01c4067ba9635.tar.gz scummvm-rg350-8e1e4b9079a96d5b48bc445fabd01c4067ba9635.tar.bz2 scummvm-rg350-8e1e4b9079a96d5b48bc445fabd01c4067ba9635.zip |
Fixed inventory regression introduced with yesterday's commit.
svn-id: r29091
Diffstat (limited to 'engines/parallaction/inventory.cpp')
-rw-r--r-- | engines/parallaction/inventory.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index b41a6f9f8d..56a29ea277 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -333,10 +333,7 @@ void Inventory::clear(bool keepVerbs) { ItemName Inventory::getItemName(ItemPosition pos) const { - // TODO: should assert against the number of items actually contained, - // not the theoretical limit. - assert(pos >= 0 && pos < INVENTORY_MAX_ITEMS); - return _items[pos]._index; + return (pos >= 0 && pos < INVENTORY_MAX_ITEMS) ? _items[pos]._index : 0; } const InventoryItem* Inventory::getItem(ItemPosition pos) const { |