From 2141ca23687b538ad5c537fc468b61bfc3b01bc2 Mon Sep 17 00:00:00 2001 From: frosch Date: Fri, 16 Apr 2010 21:21:54 +0000 Subject: (svn r19643) -Fix (r19120): Industry generation failed for large maps and lots of industry types. --- src/core/random_func.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/random_func.hpp') diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp index d0e12ba92..03d49d718 100644 --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -99,8 +99,9 @@ void SetRandomSeed(uint32 seed); return _random.Next(); } - static FORCEINLINE uint32 RandomRange(uint16 max) + static FORCEINLINE uint32 RandomRange(uint max) { + assert(max <= UINT16_MAX); return _random.Next(max); } #endif -- cgit v1.2.3-54-g00ecf