aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sludge/builtin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sludge/builtin.cpp b/engines/sludge/builtin.cpp
index 1030643788..185ff1a23c 100644
--- a/engines/sludge/builtin.cpp
+++ b/engines/sludge/builtin.cpp
@@ -698,7 +698,7 @@ builtIn(random) {
trimStack(fun->stack);
if (num <= 0)
num = 1;
- fun->reg.setVariable(SVT_INT, 0 /*rand() % num*/); //TODO:false value
+ fun->reg.setVariable(SVT_INT, g_sludge->getRandomSource()->getRandomNumber(num - 1));
return BR_CONTINUE;
}