diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -57,6 +57,7 @@ uint32 DoRandom(int line, const char *fi 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 */