aboutsummaryrefslogtreecommitdiff
path: root/scumm/akos.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scumm/akos.cpp')
-rw-r--r--scumm/akos.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scumm/akos.cpp b/scumm/akos.cpp
index 6e27eaf66a..cc588cc1b2 100644
--- a/scumm/akos.cpp
+++ b/scumm/akos.cpp
@@ -319,7 +319,7 @@ void AkosRenderer::codec1_genericDecode()
if (v1.scaletable[v1.tmp_x] < scale_x) {
v1.x += v1.scaleXstep;
- if (v1.x >= _vm->_realWidth)
+ if (v1.x < 0 || v1.x >= _vm->_realWidth)
return;
maskbit = revBitMask[v1.x & 7];
v1.destptr += v1.scaleXstep;
@@ -387,7 +387,7 @@ void AkosRenderer::codec1_spec1()
if (v1.scaletable[v1.tmp_x] < scale_x) {
v1.x += v1.scaleXstep;
- if (v1.x >= _vm->_realWidth)
+ if (v1.x < 0 || v1.x >= _vm->_realWidth)
return;
maskbit = revBitMask[v1.x & 7];
v1.destptr += v1.scaleXstep;
@@ -463,7 +463,7 @@ void AkosRenderer::codec1_spec3()
if (v1.scaletable[v1.tmp_x] < scale_x) {
v1.x += v1.scaleXstep;
- if (v1.x >= _vm->_realWidth)
+ if (v1.x < 0 || v1.x >= _vm->_realWidth)
return;
maskbit = revBitMask[v1.x & 7];
v1.destptr += v1.scaleXstep;