diff options
Diffstat (limited to 'engines/director/lingo')
-rw-r--r-- | engines/director/lingo/lingo-builtins.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/director/lingo/lingo-builtins.cpp b/engines/director/lingo/lingo-builtins.cpp index 2286bb7ed2..311e774e0d 100644 --- a/engines/director/lingo/lingo-builtins.cpp +++ b/engines/director/lingo/lingo-builtins.cpp @@ -43,10 +43,12 @@ void Lingo::b_random() { Datum max = g_lingo->pop(); Datum res; - res.u.i = 5; + if (max.type != INT) + warning("Non-int type for rand: %d", max.type); + + res.u.i = g_lingo->_vm->_rnd.getRandomNumber(max.u.i); res.type = INT; - warning("b_random"); g_lingo->push(res); } |