aboutsummaryrefslogtreecommitdiff
path: root/src/random.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/random.h')
-rw-r--r--src/random.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/random.h b/src/random.h
index 22801ec155..9d1f751773 100644
--- a/src/random.h
+++ b/src/random.h
@@ -166,6 +166,7 @@ public:
/** Generate a random integer in the range [0..range). */
uint64_t randrange(uint64_t range) noexcept
{
+ assert(range);
--range;
int bits = CountBits(range);
while (true) {