aboutsummaryrefslogtreecommitdiff
path: root/scumm
diff options
context:
space:
mode:
Diffstat (limited to 'scumm')
-rw-r--r--scumm/gfx.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index d7b1996074..19965a6c1b 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -898,6 +898,9 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h,
if (vs->scrollable)
sx -= vs->xstart >> 3;
+ if (sx < 0)
+ goto next_iter;
+
if (sx >= _numStrips)
return;
@@ -993,6 +996,8 @@ void Gdi::drawBitmap(byte *ptr, VirtScreen *vs, int x, int y, int h,
}
}
}
+
+next_iter:
CHECK_HEAP;
x++;
stripnr++;