From 5a2d871a2b480c9237b51e910a5d71d91418dfbb Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 29 Apr 2005 15:01:03 +0000 Subject: Replaced rand()/srand() with RandomSource. Of course, util_getRandom() is a pretty unnecessary function - we could call RandomSource directly - but let's take this one thing at a time. svn-id: r17863 --- gob/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gob/util.cpp') diff --git a/gob/util.cpp b/gob/util.cpp index ad5198a693..9596d38215 100644 --- a/gob/util.cpp +++ b/gob/util.cpp @@ -126,7 +126,7 @@ int16 util_checkKey(void) { } int16 util_getRandom(int16 max) { - return ((int32)rand() * max) / (RAND_MAX + 1); + return _vm->_rnd.getRandomNumber(max - 1); } void util_processInput() { -- cgit v1.2.3