diff --git a/src/core/random_func.hpp b/src/core/random_func.hpp --- a/src/core/random_func.hpp +++ b/src/core/random_func.hpp @@ -88,7 +88,7 @@ static inline uint32 InteractiveRandomRa static inline bool Chance16I(const uint a, const uint b, const uint32 r) { assert(b != 0); - return (uint16)r < (uint16)((a << 16) / b); + return (uint16)r < (uint16)(((a << 16) + b / 2) / b); } /**