[Scummvm-cvs-logs] CVS: scummvm/scumm gfx.cpp,2.99,2.100

Max Horn fingolfin at users.sourceforge.net
Thu May 15 10:54:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv29894

Modified Files:
	gfx.cpp 
Log Message:
adding some asserts (e.g. against that evil COMI crasher)

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.99
retrieving revision 2.100
diff -u -d -r2.99 -r2.100
--- gfx.cpp	14 May 2003 14:07:11 -0000	2.99
+++ gfx.cpp	15 May 2003 17:53:23 -0000	2.100
@@ -484,6 +484,8 @@
 	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 @@
 
 	// 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;





More information about the Scummvm-git-logs mailing list