diff --git a/src/lol/math/rand.h b/src/lol/math/rand.h index 8abf7b72..3938904c 100644 --- a/src/lol/math/rand.h +++ b/src/lol/math/rand.h @@ -94,7 +94,7 @@ template static inline T rand() ret = (ret << 8) ^ std::rand(); ret = (ret << 8) ^ std::rand(); } - return static_cast(ret & 0x7fffffffffffffffllu); + return static_cast(ret & (~(uint64_t)0 >> 1)); } default: ASSERT(false, "rand() doesn’t support types of size %d\n",