Skip to content

Commit

Permalink
fix compilation in debug build
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Nov 21, 2019
1 parent b8ac8d6 commit c19e12e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion weave/random/rng.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)):
Expand Down

0 comments on commit c19e12e

Please sign in to comment.