diff options
author | Colin Snover | 2016-07-11 08:54:10 -0500 |
---|---|---|
committer | Colin Snover | 2016-07-11 10:39:50 -0500 |
commit | f171db965c2a927d8d526f56d777a70f6b89ed51 (patch) | |
tree | 3425b08666bcc016961bc402bf2e5317d117d2a2 /engines/sci/graphics | |
parent | e4588a713435a4606d5799132d602522151839fb (diff) | |
download | scummvm-rg350-f171db965c2a927d8d526f56d777a70f6b89ed51.tar.gz scummvm-rg350-f171db965c2a927d8d526f56d777a70f6b89ed51.tar.bz2 scummvm-rg350-f171db965c2a927d8d526f56d777a70f6b89ed51.zip |
SCI32: Guard against no split count
CID 1357229.
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/plane32.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/sci/graphics/plane32.cpp b/engines/sci/graphics/plane32.cpp index 175875c414..87ab43bb5c 100644 --- a/engines/sci/graphics/plane32.cpp +++ b/engines/sci/graphics/plane32.cpp @@ -595,8 +595,10 @@ void Plane::filterDownEraseRects(DrawList &drawList, RectList &eraseList, RectLi Common::Rect outRects[4]; const Common::Rect &r2 = *higherEraseList[i]; int splitCount = splitRects(r2, r, outRects); - while (splitCount--) { - higherEraseList.add(outRects[splitCount]); + if (splitCount > 0) { + while (splitCount--) { + higherEraseList.add(outRects[splitCount]); + } } higherEraseList.erase_at(i); } |