aboutsummaryrefslogtreecommitdiff
path: root/scumm/boxes.cpp
diff options
context:
space:
mode:
authorMax Horn2003-01-13 13:37:43 +0000
committerMax Horn2003-01-13 13:37:43 +0000
commite704837f5c987a840c6ef690807c319425b85ea5 (patch)
treef488e41e229c1f9cd63377e234876af20bcec76e /scumm/boxes.cpp
parent35d3d26f0cd4ca11beae544fa3c36f32c2c0df8b (diff)
downloadscummvm-rg350-e704837f5c987a840c6ef690807c319425b85ea5.tar.gz
scummvm-rg350-e704837f5c987a840c6ef690807c319425b85ea5.tar.bz2
scummvm-rg350-e704837f5c987a840c6ef690807c319425b85ea5.zip
fix off by one error
svn-id: r6442
Diffstat (limited to 'scumm/boxes.cpp')
-rw-r--r--scumm/boxes.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scumm/boxes.cpp b/scumm/boxes.cpp
index c57ca1e27e..088ce91173 100644
--- a/scumm/boxes.cpp
+++ b/scumm/boxes.cpp
@@ -136,9 +136,9 @@ int Scumm::getScale(int box, int x, int y)
if (_features & GF_AFTER_V8) {
int slot = FROM_LE_32(ptr->v8.scaleSlot);
if (slot) {
- assert(0 <= slot && slot < 20);
+ assert(1 <= slot && slot <= 20);
int scaleX = 0, scaleY = 0;
- ScaleSlot &s = _scaleSlots[slot];
+ ScaleSlot &s = _scaleSlots[slot-1];
if (s.y1 == s.y2 && s.x1 == s.x2)
error("Invalid scale slot %d", slot);