diff --git a/include/boost/random/detail/large_arithmetic.hpp b/include/boost/random/detail/large_arithmetic.hpp index 3f96e07..66f6b4e 100644 --- a/include/boost/random/detail/large_arithmetic.hpp +++ b/include/boost/random/detail/large_arithmetic.hpp @@ -96,8 +96,8 @@ inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t quotient[i - 2] = q; product[i] = 0; - product[i-1] = (rem >> bits) & mask; - product[i-2] = rem & mask; + product[i-1] = static_cast((rem >> bits) & mask); + product[i-2] = static_cast(rem & mask); } div_t result = {