diff options
Diffstat (limited to 'src/core/random_func.hpp')
-rw-r--r-- | src/core/random_func.hpp | 3 |
1 files changed, 2 insertions, 1 deletions
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 |