diff options
author | Max Horn | 2003-05-15 17:53:23 +0000 |
---|---|---|
committer | Max Horn | 2003-05-15 17:53:23 +0000 |
commit | 6fa0114eee817b0ac9ad5f3c7388830b63fb0643 (patch) | |
tree | 7873aac064f04a935e0c088bcf4a467ffd0c10eb | |
parent | 7e7719fd16fe5b4e753f3e6930d739edb8d8da3e (diff) | |
download | scummvm-rg350-6fa0114eee817b0ac9ad5f3c7388830b63fb0643.tar.gz scummvm-rg350-6fa0114eee817b0ac9ad5f3c7388830b63fb0643.tar.bz2 scummvm-rg350-6fa0114eee817b0ac9ad5f3c7388830b63fb0643.zip |
adding some asserts (e.g. against that evil COMI crasher)
svn-id: r7526
-rw-r--r-- | scumm/gfx.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 0951330554..ae8b049ab0 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -484,6 +484,8 @@ void Gdi::resetBackground(int top, int bottom, int strip) { byte *backbuff_ptr, *bgbak_ptr; int offs, numLinesToProcess; + assert(0 <= strip && strip < _numStrips); + if (top < vs->tdirty[strip]) vs->tdirty[strip] = top; @@ -626,6 +628,7 @@ void Scumm::drawFlashlight() { // Redraw any actors "under" the flashlight for (i = _flashlight.x / 8; i < (_flashlight.x + _flashlight.w) / 8; i++) { + assert(0 <= i && i < gdi._numStrips); setGfxUsageBit(_screenStartStrip + i, USAGE_BIT_DIRTY); virtscr[0].tdirty[i] = 0; virtscr[0].bdirty[i] = virtscr[0].height; |