mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
Don't crash at getRandom(0)
svn-id: r28411
This commit is contained in:
parent
b9092cc18d
commit
8d09c1a3ad
@ -49,6 +49,9 @@ uint32 Util::getTimeKey(void) {
|
||||
}
|
||||
|
||||
int16 Util::getRandom(int16 max) {
|
||||
if (max == 0)
|
||||
return 0;
|
||||
|
||||
return _vm->_rnd.getRandomNumber(max - 1);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user