From c19e12e4ae5d5bdf577a373ae935dec77678b161 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mamy=20Andr=C3=A9-Ratsimbazafy?= Date: Thu, 21 Nov 2019 16:34:56 +0100 Subject: [PATCH] fix compilation in debug build --- weave/random/rng.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weave/random/rng.nim b/weave/random/rng.nim index 9e5d4c2..f1fa68b 100644 --- a/weave/random/rng.nim +++ b/weave/random/rng.nim @@ -64,7 +64,7 @@ func next(rng: var RngState): uint64 = func uniform*(rng: var RngState, max: SomeInteger): int32 = ## Returns a random integer in the range 0 ..< max ## Unlike Nim ``random`` stdlib, max is excluded. - preCondition: max > 0 + preCondition: max.int > 0 while true: let x = rng.next() if x <= high(uint64) - (high(uint64) mod uint64(max)):