aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2012-01-01 20:14:37 +1100
committerPaul Gilbert2012-01-01 20:14:37 +1100
commitfe552696533e47b79d1299c831dfda98de884b01 (patch)
treeb7dd664ba6a4889cf96710360bb0b2e0fa6de38e /engines
parentbe706b1846bd2bff802d3da9fc24a0feed2078e8 (diff)
downloadscummvm-rg350-fe552696533e47b79d1299c831dfda98de884b01.tar.gz
scummvm-rg350-fe552696533e47b79d1299c831dfda98de884b01.tar.bz2
scummvm-rg350-fe552696533e47b79d1299c831dfda98de884b01.zip
TSAGE: Bugfix for trying to draw off screen objects, which was causing invalid dirty rects
Diffstat (limited to 'engines')
-rw-r--r--engines/tsage/graphics.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/tsage/graphics.cpp b/engines/tsage/graphics.cpp
index af3a2f9199..4db898662f 100644
--- a/engines/tsage/graphics.cpp
+++ b/engines/tsage/graphics.cpp
@@ -595,7 +595,8 @@ void GfxSurface::copyFrom(GfxSurface &src, Rect srcBounds, Rect destBounds, Regi
if (destBounds.bottom > destSurface.h)
destBounds.bottom = destSurface.h;
- if (destBounds.isValidRect()) {
+ if (destBounds.isValidRect() && !((destBounds.right < 0) || (destBounds.bottom < 0)
+ || (destBounds.left >= SCREEN_WIDTH) || (destBounds.top >= SCREEN_HEIGHT))) {
// Register the affected area as dirty
addDirtyRect(destBounds);