diff options
author | Max Horn | 2005-04-26 13:16:02 +0000 |
---|---|---|
committer | Max Horn | 2005-04-26 13:16:02 +0000 |
commit | e811cb091b8f1e483c7c086c67b67dcfa22db667 (patch) | |
tree | a64746bdec6927bc62eaadfdd5e8e590abf7c6f5 /scumm | |
parent | f03e73c621d92f7a4bb9013c3861a16d6bfcb6fa (diff) | |
download | scummvm-rg350-e811cb091b8f1e483c7c086c67b67dcfa22db667.tar.gz scummvm-rg350-e811cb091b8f1e483c7c086c67b67dcfa22db667.tar.bz2 scummvm-rg350-e811cb091b8f1e483c7c086c67b67dcfa22db667.zip |
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
Diffstat (limited to 'scumm')
-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); |