From d17f18223e3ea75411b12e91324b62e634ad9bf0 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 21 Jan 2007 08:53:18 +0000 Subject: fixed out-of-bounds error causing premature crashes on some systems svn-id: r25140 --- engines/parallaction/inventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 89218f9a88..c6ee0f7e8d 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -151,7 +151,7 @@ void addInventoryItem(uint16 item) { void dropItem(uint16 v) { uint16 _di = 0; - for (uint16 _si = 0; _si < INVENTORY_MAX_ITEMS; _si++) { + for (uint16 _si = 0; _si < INVENTORY_MAX_ITEMS - 1; _si++) { if (v + 4 == _inventory[_si]._index) { _di = 1; -- cgit v1.2.3