[Scummvm-cvs-logs] CVS: scummvm boxes.cpp,1.37,1.38

James Brown ender at users.sourceforge.net
Mon Aug 12 07:56:05 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv2518

Modified Files:
	boxes.cpp 
Log Message:
MadMoose's fix for an infinite loop in MonkeyVGA


Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/boxes.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- boxes.cpp	16 Jul 2002 17:59:27 -0000	1.37
+++ boxes.cpp	12 Aug 2002 14:54:57 -0000	1.38
@@ -1,4 +1,4 @@
-/* ScummVM - Scumm Interpreter
+	/* ScummVM - Scumm Interpreter
  * Copyright (C) 2001  Ludvig Strigeus
  * Copyright (C) 2001/2002 The ScummVM project
  *
@@ -374,6 +374,7 @@
 {
 	byte *boxm;
 	byte i;
+	int dest = -1;
 
 	if (from == to)
 		return to;
@@ -390,10 +391,10 @@
 
 	while (boxm[0] != 0xFF) {
 		if (boxm[0] <= to && boxm[1] >= to)
-			return boxm[2];
+			dest = boxm[2];
 		boxm += 3;
 	}
-	return -1;
+	return dest;
 }
 
 int Scumm::findPathTowards(Actor *a, byte box1nr, byte box2nr, byte box3nr)





More information about the Scummvm-git-logs mailing list