From 0998a2440afa101f9db1ee141f3674f8fbd85c4e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 25 Jul 2007 19:56:43 +0000 Subject: 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 --- engines/scumm/gfx.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/scumm') 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); -- cgit v1.2.3