diff options
| author | Johannes Schickel | 2009-05-29 11:43:22 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2009-05-29 11:43:22 +0000 | 
| commit | e23a2299993ec87284b538062383d8973f18fb3b (patch) | |
| tree | 386fc87edcef41fadfe21eda019ac9c287ea7f92 | |
| parent | fd34892cd53e9dc9504dff23e7dd2103fded8f0d (diff) | |
| download | scummvm-rg350-e23a2299993ec87284b538062383d8973f18fb3b.tar.gz scummvm-rg350-e23a2299993ec87284b538062383d8973f18fb3b.tar.bz2 scummvm-rg350-e23a2299993ec87284b538062383d8973f18fb3b.zip | |
Fix valgrind warnings.
svn-id: r40983
| -rw-r--r-- | engines/kyra/screen.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index fda2c52ad7..4e7f391ce9 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1413,7 +1413,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int  	uint8 *d = dst; -	while (shapeHeight--) { +	while (true) {  		bool normalPlot = true;  		if (flags & 0x800)  			normalPlot = (curY > _maskMinY && curY < _maskMaxY); @@ -1447,7 +1447,9 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int  			dst += dsPitch;  			d = dst;  			++curY; -			scaleCounterV -= 256; +			if (!--shapeHeight) +				return; +			scaleCounterV -= 0x100;  		} while (scaleCounterV & 0xff00);  	} | 
