Perform some clipping (some old savegames had bad usage bits in the same and caused a crash for me due to lack of clipping)

svn-id: r17814
This commit is contained in:
Max Horn 2005-04-26 13:16:02 +00:00
parent f03e73c621
commit e811cb091b

View file

@ -1674,6 +1674,12 @@ void Gdi::resetBackground(int top, int bottom, int strip) {
VirtScreen *vs = &_vm->virtscr[0]; VirtScreen *vs = &_vm->virtscr[0];
byte *backbuff_ptr, *bgbak_ptr; byte *backbuff_ptr, *bgbak_ptr;
int numLinesToProcess; int numLinesToProcess;
if (bottom >= vs->h)
bottom = vs->h;
if (top >= bottom)
return;
assert(0 <= strip && strip < _numStrips); assert(0 <= strip && strip < _numStrips);