aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-06-12 06:53:05 +0000
committerTorbjörn Andersson2003-06-12 06:53:05 +0000
commita8b61e464f6184f0d4e2b964a77fab1d461ef164 (patch)
tree95067bdaad923f245068565a9658eeb461d91a4a
parentf504809b87ea5a3e879513051385049964af86a1 (diff)
downloadscummvm-rg350-a8b61e464f6184f0d4e2b964a77fab1d461ef164.tar.gz
scummvm-rg350-a8b61e464f6184f0d4e2b964a77fab1d461ef164.tar.bz2
scummvm-rg350-a8b61e464f6184f0d4e2b964a77fab1d461ef164.zip
The compressed box matrix would sometimes refer to the box after the last
one. This was probably harmless, but the fix seems to be trivial. I hope. svn-id: r8441
-rw-r--r--scumm/boxes.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index ffd85d9301..3b550fce6b 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -850,7 +850,7 @@ void Scumm::createBoxMatrix() {
byte itinerary = itineraryMatrix[64 * i + j];
if (itinerary != Actor::kInvalidBox) {
addToMatrix(j);
- while (j < num && itinerary == itineraryMatrix[64 * i + (j + 1)])
+ while (j < num - 1 && itinerary == itineraryMatrix[64 * i + (j + 1)])
j++;
addToMatrix(j);
addToMatrix(itinerary);