aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/inventory.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-04-09 09:32:14 -0400
committerPaul Gilbert2014-04-09 09:32:14 -0400
commit8df08335462db8fc692f18c9dc5bb4293019d2f6 (patch)
treeb69e840424bb7e5ea664c3f3ab6c2554dfb67d8b /engines/mads/inventory.cpp
parent2368ab78865f251184908d523edeab34514e08ed (diff)
downloadscummvm-rg350-8df08335462db8fc692f18c9dc5bb4293019d2f6.tar.gz
scummvm-rg350-8df08335462db8fc692f18c9dc5bb4293019d2f6.tar.bz2
scummvm-rg350-8df08335462db8fc692f18c9dc5bb4293019d2f6.zip
MADS: Fixes for correctly displaying inventory list in the user interface
Diffstat (limited to 'engines/mads/inventory.cpp')
-rw-r--r--engines/mads/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/mads/inventory.cpp b/engines/mads/inventory.cpp
index 607179a3c2..0795233f6c 100644
--- a/engines/mads/inventory.cpp
+++ b/engines/mads/inventory.cpp
@@ -110,7 +110,7 @@ void InventoryObjects::addToInventory(int objectId) {
userInterface._inventoryTopIndex = CLIP(userInterface._inventoryTopIndex,
0, (int)_inventoryList.size() - 1);
- if ((userInterface._inventoryTopIndex + 5) <= ((int) size() - 1))
+ if ((userInterface._inventoryTopIndex + 5) < (int)_inventoryList.size())
userInterface._inventoryTopIndex = size() - 5;
userInterface._inventoryChanged = true;