[Scummvm-cvs-logs] CVS: scummvm/saga sfuncs.cpp,1.88,1.89

Torbjörn Andersson eriktorbjorn at users.sourceforge.net
Tue Jan 25 10:17:03 CET 2005


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

Modified Files:
	sfuncs.cpp 
Log Message:
The sfRand() script function was slightly wrong

Old behaviour:     0 <= random number <= param
Correct behaviour: 0 <= random number < param


Index: sfuncs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/sfuncs.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- sfuncs.cpp	23 Jan 2005 21:52:43 -0000	1.88
+++ sfuncs.cpp	25 Jan 2005 18:16:02 -0000	1.89
@@ -1525,8 +1525,7 @@
 void Script::sfRand(SCRIPTFUNC_PARAMS) {
 	int16 param = thread->pop();
 
-	thread->_returnValue = (_vm->_rnd.getRandomNumber(param));
-
+	thread->_returnValue = _vm->_rnd.getRandomNumber(param - 1);
 }
 
 // Script function #76 (0x4c)





More information about the Scummvm-git-logs mailing list