[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.133,1.134

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Wed Jul 6 10:57:30 CEST 2005


Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9785

Modified Files:
	sfuncs.cpp 
Log Message:
Fixed stopping sounds. I think that at one point our 'param' used to be
unsigned, but it isn't any more.


Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- sfuncs.cpp	5 Jul 2005 16:58:36 -0000	1.133
+++ sfuncs.cpp	6 Jul 2005 17:55:53 -0000	1.134
@@ -1737,7 +1737,7 @@
 	int16 param = thread->pop();
 	int res;
 
-	if (param < ARRAYSIZE(sfxTable)) {
+	if (param >= 0 && param < ARRAYSIZE(sfxTable)) {
 		res = sfxTable[param].res;
 		if (_vm->getFeatures() & GF_CD_FX)
 			res -= 14;
@@ -1753,7 +1753,7 @@
 	int16 param = thread->pop();
 	int res;
 
-	if (param < ARRAYSIZE(sfxTable)) {
+	if (param >= 0 && param < ARRAYSIZE(sfxTable)) {
 		res = sfxTable[param].res;
 		if (_vm->getFeatures() & GF_CD_FX)
 			res -= 14;





More information about the Scummvm-git-logs mailing list