aboutsummaryrefslogtreecommitdiff
path: root/engines/access/asurface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/access/asurface.cpp')
-rw-r--r--engines/access/asurface.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/engines/access/asurface.cpp b/engines/access/asurface.cpp
index 5a090afaca..ba75607637 100644
--- a/engines/access/asurface.cpp
+++ b/engines/access/asurface.cpp
@@ -115,13 +115,14 @@ bool ASurface::clip(Common::Rect &r) {
_topSkip = _bottomSkip = 0;
if (r.left > _clipWidth) {
+ if (r.left >= 0)
+ return true;
+
skip = -r.left;
r.setWidth(r.width() - skip);
_leftSkip = skip;
r.moveTo(0, r.top);
}
- else if (r.left >= 0)
- return true;
int right = r.right - 1;
if (right < 0)
@@ -133,13 +134,14 @@ bool ASurface::clip(Common::Rect &r) {
}
if (r.top > _clipHeight) {
+ if (r.top >= 0)
+ return true;
+
skip = -r.top;
r.setHeight(r.height() - skip);
_topSkip = skip;
r.moveTo(r.left, 0);
}
- else if (r.top >= 0)
- return true;
int bottom = r.bottom - 1;
if (bottom < 0)