mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix randoms:uniform/1 return
Make sure randoms:uniform/1 returns values from the same interval as deprecated random:uniform/1
This commit is contained in:
parent
4c5460f0bd
commit
d19552f464
@ -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) ->
|
||||
|
Loading…
Reference in New Issue
Block a user