diff --git a/src/randoms.erl b/src/randoms.erl index 75bc280a2..1353f48af 100644 --- a/src/randoms.erl +++ b/src/randoms.erl @@ -44,7 +44,7 @@ uniform() -> crypto:rand_uniform(0, ?THRESHOLD)/?THRESHOLD. uniform(N) -> - crypto:rand_uniform(0, N). + crypto:rand_uniform(1, N+1). -ifdef(STRONG_RAND_BYTES). bytes(N) ->