From b566583e3231b70512b7954a7b00cc0f02f9f24c Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sun, 3 Jun 2012 21:16:25 +1000 Subject: [PATCH] TONY: Workaround for hang on title screen if you click with a y = 0 --- engines/tony/loc.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index f0dd30b1a9b..512c28605e2 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -1298,6 +1298,10 @@ RMPoint RMCharacter::InvScanLine(const RMPoint &punto) { } Lscan.x = Lstart.x + Ldx; Lscan.y = Lstart.y + Ldy; + + // WORKAROUND: Handles cases where the points never fall inside a bounding box + if (Lscan.x < -100 || Lscan.y < -100 || Lscan.x >= 1000 || Lscan.y >= 1000) + return punto; } }