aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fioramonti2017-08-24 04:06:12 -0700
committerDavid Fioramonti2017-08-24 04:30:59 -0700
commit9b10f5dc293015911f9205b07778a3b654321935 (patch)
tree58636c5533ef2cc220f16e6d1c43017d304bff59
parentc96b01b82e6213128bc03b1ed94fc2ebaf4f36d7 (diff)
downloadscummvm-rg350-9b10f5dc293015911f9205b07778a3b654321935.tar.gz
scummvm-rg350-9b10f5dc293015911f9205b07778a3b654321935.tar.bz2
scummvm-rg350-9b10f5dc293015911f9205b07778a3b654321935.zip
TITANIC: Fixed titanic.h float random function range
Fixed float random number function of titanic.h which could of given 65537 instead of a max of 65535.
-rw-r--r--engines/titanic/titanic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index cf0a4d3c67..c49a13747f 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -178,7 +178,7 @@ public:
/**
* Returns a uniform random floating point number in the interval [0.0, 65535.0]
*/
- double getRandomFloat() { return getRandomNumber(0xfffffffe) * 0.000015259022; }
+ double getRandomFloat() { return getRandomNumber(0xfffffffe) * 0.00001525855623540901; } // fffffffe=4294967294 and 0.00001525855623540901 ~= 1/65537.0
/**
* Support method that generates a savegame name