aboutsummaryrefslogtreecommitdiff
path: root/engines/toon
diff options
context:
space:
mode:
authorsylvaintv2012-02-12 23:18:40 +0100
committersylvaintv2012-02-12 23:18:40 +0100
commit24e50eb218db5de3bad806737cba247798112a2a (patch)
tree523736353b43c65676594c2f90a661c152b6266f /engines/toon
parent8b39b0b0faa07ec5bc5f18cc2ec00ecd5b3fb949 (diff)
downloadscummvm-rg350-24e50eb218db5de3bad806737cba247798112a2a.tar.gz
scummvm-rg350-24e50eb218db5de3bad806737cba247798112a2a.tar.bz2
scummvm-rg350-24e50eb218db5de3bad806737cba247798112a2a.zip
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.
Diffstat (limited to 'engines/toon')
-rw-r--r--engines/toon/toon.cpp4
1 files changed, 2 insertions, 2 deletions
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<int32>(MAX<int32>(top, 0), TOON_BACKBUFFER_HEIGHT);
bottom = MIN<int32>(MAX<int32>(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;