aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/saga/scene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp
index dbcca5021c..336399eefa 100644
--- a/engines/saga/scene.cpp
+++ b/engines/saga/scene.cpp
@@ -553,8 +553,8 @@ bool Scene::offscreenPath(Point &testPoint) {
return false;
}
- point.x = clamp( 0, testPoint.x, _bgMask.w - 1 );
- point.y = clamp( 0, testPoint.y, _bgMask.h - 1 );
+ point.x = clamp(0, testPoint.x, _vm->getDisplayWidth() - 1);
+ point.y = clamp(0, testPoint.y, _bgMask.h - 1);
if (point == testPoint) {
return false;
}