From 24e50eb218db5de3bad806737cba247798112a2a Mon Sep 17 00:00:00 2001 From: sylvaintv Date: Sun, 12 Feb 2012 23:18:40 +0100 Subject: TOON: Fix bug #3467139 with russian version crash Bug #3467139: "TOON: Russian Version Crashes" A frame is corrupted in an localized animation Moved the check before the Rect creation. --- engines/toon/toon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/toon') diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp index 99932362af..657e18635f 100644 --- a/engines/toon/toon.cpp +++ b/engines/toon/toon.cpp @@ -4666,11 +4666,11 @@ void ToonEngine::addDirtyRect( int32 left, int32 top, int32 right, int32 bottom top = MIN(MAX(top, 0), TOON_BACKBUFFER_HEIGHT); bottom = MIN(MAX(bottom, 0), TOON_BACKBUFFER_HEIGHT); - Common::Rect rect(left, top, right, bottom); - if (bottom - top <= 0 || right - left <= 0) return; + Common::Rect rect(left, top, right, bottom); + for (uint32 i = 0; i < _dirtyRects.size(); i++) { if (_dirtyRects[i].contains(rect)) return; -- cgit v1.2.3