[Scummvm-cvs-logs] CVS: scummvm/scumm sound.cpp,1.165,1.166

Max Horn fingolfin at users.sourceforge.net
Mon Jul 14 15:25:04 CEST 2003


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

Modified Files:
	sound.cpp 
Log Message:
temporarily changed this to an error to help track down what is causing the sound queue overflows(in particular, to figure out the room/script/offset where the bug occurs). Please report your findings to Fingolfin

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/sound.cpp,v
retrieving revision 1.165
retrieving revision 1.166
diff -u -d -r1.165 -r1.166
--- sound.cpp	14 Jul 2003 21:37:45 -0000	1.165
+++ sound.cpp	14 Jul 2003 22:24:18 -0000	1.166
@@ -125,8 +125,7 @@
 }
 
 void Sound::processSoundQues() {
-	int d;
-	int num;
+	int i = 0, d, num;
 	int16 data[16];
 
 	processSfxQueues();
@@ -137,7 +136,7 @@
 			playSound(d);
 	}
 
-	for (int i = 0; i < _soundQuePos;) {
+	while (i < _soundQuePos) {
 		num = _soundQue[i++];
 		if (i + num > _soundQuePos) {
 			warning("processSoundQues: invalid num value");
@@ -832,7 +831,11 @@
 	}
 
 	if ((_soundQuePos + num) > 0x100) {
-		warning("Sound que buffer overflow (%d + %d = %d)", _soundQuePos, num, _soundQuePos+num);
+		// FIXME: temporarily changed this to an error to help track down what
+		// is causing the sound queue overflows(in particular, to figure out
+		// the room/script/offset where the bug occurs). Please report your
+		// findings to Fingolfin.
+		error("Sound que buffer overflow (%d + %d = %d)", _soundQuePos, num, _soundQuePos+num);
 		return;
 	}
 





More information about the Scummvm-git-logs mailing list