aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
Diffstat (limited to 'saga')
-rw-r--r--saga/sfuncs.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/saga/sfuncs.cpp b/saga/sfuncs.cpp
index 10513f3215..2f3447694f 100644
--- a/saga/sfuncs.cpp
+++ b/saga/sfuncs.cpp
@@ -1525,8 +1525,7 @@ void Script::SF_protectResult(SCRIPTFUNC_PARAMS) {
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)