diff options
author | frosch <frosch@openttd.org> | 2010-04-16 21:21:54 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-04-16 21:21:54 +0000 |
commit | 2141ca23687b538ad5c537fc468b61bfc3b01bc2 (patch) | |
tree | e3283f1151ac31f0a09f2469d2063748ff415a93 /src/core/random_func.cpp | |
parent | d1c3234918fce4aae945eded5ecf0ed527bb000b (diff) | |
download | openttd-2141ca23687b538ad5c537fc468b61bfc3b01bc2.tar.xz |
(svn r19643) -Fix (r19120): Industry generation failed for large maps and lots of industry types.
Diffstat (limited to 'src/core/random_func.cpp')
-rw-r--r-- | src/core/random_func.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index dfdf9c869..588bcb7b2 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -57,6 +57,7 @@ uint32 DoRandom(int line, const char *file) uint DoRandomRange(uint max, int line, const char *file) { + assert(max <= UINT16_MAX); return GB(DoRandom(line, file), 0, 16) * max >> 16; } #endif /* RANDOM_DEBUG */ |