diff options
-rw-r--r-- | scumm/gfx.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 7bd5660048..1ef5f5d12d 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -1674,6 +1674,12 @@ void Gdi::resetBackground(int top, int bottom, int strip) { VirtScreen *vs = &_vm->virtscr[0]; byte *backbuff_ptr, *bgbak_ptr; int numLinesToProcess; + + if (bottom >= vs->h) + bottom = vs->h; + + if (top >= bottom) + return; assert(0 <= strip && strip < _numStrips); |