diff options
author | Max Horn | 2003-01-13 13:37:43 +0000 |
---|---|---|
committer | Max Horn | 2003-01-13 13:37:43 +0000 |
commit | e704837f5c987a840c6ef690807c319425b85ea5 (patch) | |
tree | f488e41e229c1f9cd63377e234876af20bcec76e /scumm/scummvm.cpp | |
parent | 35d3d26f0cd4ca11beae544fa3c36f32c2c0df8b (diff) | |
download | scummvm-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/scummvm.cpp')
-rw-r--r-- | scumm/scummvm.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp index 63afbc2286..8c9bea8b85 100644 --- a/scumm/scummvm.cpp +++ b/scumm/scummvm.cpp @@ -980,12 +980,13 @@ void Scumm::setScaleItem(int slot, int a, int b, int c, int d) void Scumm::setScaleSlot(int slot, int x1, int y1, int scale1, int x2, int y2, int scale2) { - _scaleSlots[slot].x2 = x2; - _scaleSlots[slot].y2 = y2; - _scaleSlots[slot].scale2 = scale2; - _scaleSlots[slot].x1 = x1; - _scaleSlots[slot].y1 = y1; - _scaleSlots[slot].scale1 = scale1; + assert(1 <= slot && slot <= 20); + _scaleSlots[slot-1].x2 = x2; + _scaleSlots[slot-1].y2 = y2; + _scaleSlots[slot-1].scale2 = scale2; + _scaleSlots[slot-1].x1 = x1; + _scaleSlots[slot-1].y1 = y1; + _scaleSlots[slot-1].scale1 = scale1; } void Scumm::dumpResource(char *tag, int idx, byte *ptr) |