Skip to content

Commit

Permalink
[backport] fix #12418, fix random.randomize on JS backend (#12432)
Browse files Browse the repository at this point in the history
  • Loading branch information
narimiran authored and Araq committed Oct 15, 2019
1 parent 1aed455 commit 5f5ac8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/pure/random.nim
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ when not defined(nimscript):
## * `randomize proc<#randomize,int64>`_ that accepts a seed
## * `initRand proc<#initRand,int64>`_
when defined(JS):
let time = int64(times.epochTime() * 1000)
let time = int64(times.epochTime() * 1000) and 0x7fff_ffff
randomize(time)
else:
let now = times.getTime()
Expand Down

0 comments on commit 5f5ac8c

Please sign in to comment.