From e16e11fdf24678d79c4991623488c3d5c061722d Mon Sep 17 00:00:00 2001 From: Gregory Montoir Date: Fri, 18 May 2007 09:14:27 +0000 Subject: added missing MIN() calls svn-id: r26864 --- engines/cine/gfx.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/cine') diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index eac8d6d39a..57e58a7c1c 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -259,8 +259,8 @@ void gfxSpriteFunc2(byte *spritePtr, byte *spriteMskPtr, int16 width, int16 heig if (width <= 0) { return; } - for (j = 0; j < height; ++j) { - for (i = 0; i < width; ++i) { + for (j = 0; j < MIN(maskHeight, height); ++j) { + for (i = 0; i < MIN(maskWidth, width); ++i) { bufferMskPtr[i] |= maskPtr[i] ^ 1; } bufferMskPtr += spritePitch; -- cgit v1.2.3