Don't crash at getRandom(0)

svn-id: r28411
This commit is contained in:
Sven Hesse 2007-08-02 16:21:49 +00:00
parent b9092cc18d
commit 8d09c1a3ad

View File

@ -49,6 +49,9 @@ uint32 Util::getTimeKey(void) {
}
int16 Util::getRandom(int16 max) {
if (max == 0)
return 0;
return _vm->_rnd.getRandomNumber(max - 1);
}