aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTorbjörn Andersson2007-07-25 19:56:43 +0000
committerTorbjörn Andersson2007-07-25 19:56:43 +0000
commit0998a2440afa101f9db1ee141f3674f8fbd85c4e (patch)
tree514b9b6a1605b7dd931dec941fdcfd9e1ef29a2b /engines/scumm
parent4f403f4dd356693b1ca3ef02d3b17ef8fef118e7 (diff)
downloadscummvm-rg350-0998a2440afa101f9db1ee141f3674f8fbd85c4e.tar.gz
scummvm-rg350-0998a2440afa101f9db1ee141f3674f8fbd85c4e.tar.bz2
scummvm-rg350-0998a2440afa101f9db1ee141f3674f8fbd85c4e.zip
The drawStripToScreen() does nothing if width <= 0. In bug #1759925 ("COMI:
100% crash in SVN (not in 0.X.0)"), height was a fairly large negative number, so I've added a test for that condition as well. This seems to fix the bug. svn-id: r28199
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/gfx.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 4e7276f2d0..c1e06609b9 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -560,7 +560,7 @@ void ScummEngine::drawStripToScreen(VirtScreen *vs, int x, int width, int top, i
int y = vs->topline + top - _screenTop;
int height = bottom - top;
- if (width <= 0)
+ if (width <= 0 || height <= 0)
return;
const byte *src = vs->getPixels(x, top);