diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp index ef276e5103..80ce404593 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<uint64>::max() / nMax) * nMax; uint64 nRand = 0; do RAND_bytes((unsigned char*)&nRand, sizeof(nRand)); |