diff options
-rw-r--r-- | engines/gob/util.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index ec8bb59f06..40acf21f9e 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -49,6 +49,9 @@ uint32 Util::getTimeKey(void) { } int16 Util::getRandom(int16 max) { + if (max == 0) + return 0; + return _vm->_rnd.getRandomNumber(max - 1); } |