X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Futil.cpp;h=80ce40459354abd2013f4aa96a72e349a8fa77e7;hb=26ce92b3526430d4a40b2faccef4facb966d6a0a;hp=ef276e510339586b41a1a3410fb832c32c5282ef;hpb=bd846c0e565ca0db276cb6b7eac7763bebe19b84;p=novacoin.git diff --git a/src/util.cpp b/src/util.cpp index ef276e5..80ce404 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -133,7 +133,7 @@ uint64 GetRand(uint64 nMax) // The range of the random source must be a multiple of the modulus // to give every possible output value an equal possibility - uint64 nRange = (UINT64_MAX / nMax) * nMax; + uint64 nRange = (std::numeric_limits::max() / nMax) * nMax; uint64 nRand = 0; do RAND_bytes((unsigned char*)&nRand, sizeof(nRand));