aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorNicola Mettifogo2007-01-21 08:53:18 +0000
committerNicola Mettifogo2007-01-21 08:53:18 +0000
commitd17f18223e3ea75411b12e91324b62e634ad9bf0 (patch)
tree8e8a3b18214e1f6b621f972693d5f266552baffb /engines
parentd707bfb61528958685fb702191d37bf1c3740d53 (diff)
downloadscummvm-rg350-d17f18223e3ea75411b12e91324b62e634ad9bf0.tar.gz
scummvm-rg350-d17f18223e3ea75411b12e91324b62e634ad9bf0.tar.bz2
scummvm-rg350-d17f18223e3ea75411b12e91324b62e634ad9bf0.zip
fixed out-of-bounds error causing premature crashes on some systems
svn-id: r25140
Diffstat (limited to 'engines')
-rw-r--r--engines/parallaction/inventory.cpp2
1 files changed, 1 insertions, 1 deletions
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;