diff options
-rw-r--r-- | engines/fullpipe/gfx.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engines/fullpipe/gfx.cpp b/engines/fullpipe/gfx.cpp index 2d68600dbb..d72419b645 100644 --- a/engines/fullpipe/gfx.cpp +++ b/engines/fullpipe/gfx.cpp @@ -979,6 +979,9 @@ void Bitmap::putDibCB(int32 *palette) { byte *srcPtr = &_pixels[pitch * (endy - _y)]; + if (endy - _y < _height) + srcPtr = &_pixels[pitch * (_height - 1)]; + int starty = _y; if (starty < 0) { starty = 0; @@ -992,7 +995,7 @@ void Bitmap::putDibCB(int32 *palette) { } if (_flags & 0x1000000) { - for (int y = starty; y < endy; srcPtr -= pitch, y++) { + for (int y = starty; y <= endy; srcPtr -= pitch, y++) { curDestPtr = (uint16 *)g_fp->_backgroundSurface.getBasePtr(startx, y); copierKeyColor(curDestPtr, srcPtr, endx - startx + 1, _flags & 0xff, (int32 *)palette, cb05_format); } |