aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/gfx.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp
index c9c05c0e19..9da4e37a35 100644
--- a/scumm/gfx.cpp
+++ b/scumm/gfx.cpp
@@ -563,6 +563,10 @@ void ScummEngine::restoreBG(Common::Rect rect, byte backColor) {
rect.top -= topline;
rect.bottom -= topline;
+ if (rect.left < 0)
+ rect.left = 0;
+ if (rect.right < 0)
+ rect.right = 0;
rect.clip(vs->width, vs->height);
markRectAsDirty(vs->number, rect, USAGE_BIT_RESTORED);