summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorYuriy Glukhov <yglukhov@users.noreply.github.com>2017-08-01 20:53:12 +0300
committerAndreas Rumpf <rumpf_a@web.de>2017-08-01 19:53:12 +0200
commitf3b3af5f3f75718c887792f4b30bd977945744cb (patch)
treef49a69f77ab4ed57f20cd9df21b8240094e4b628 /lib/pure
parent3d543b1539f8d5dde5746c90c5de5fa3df1cadfd (diff)
downloadNim-f3b3af5f3f75718c887792f4b30bd977945744cb.tar.gz
Fixed randomize for 32bit target (#6167)
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/random.nim4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/random.nim b/lib/pure/random.nim
index 8a32f7d9a..27fbfad45 100644
--- a/lib/pure/random.nim
+++ b/lib/pure/random.nim
@@ -101,7 +101,7 @@ proc random*[T](a: openArray[T]): T =
   ## returns a random element from the openarray `a`.
   result = a[random(a.low..a.len)]
 
-proc randomize*(seed: int) {.benign.} =
+proc randomize*(seed: int64) {.benign.} =
   ## Initializes the random number generator with a specific seed.
   state.a0 = ui(seed shr 16)
   state.a1 = ui(seed and 0xffff)
@@ -123,7 +123,7 @@ when not defined(nimscript):
       proc getMil(t: Time): int {.importcpp: "getTime", nodecl.}
       randomize(getMil times.getTime())
     else:
-      let time = int(times.epochTime() * 1_000_000_000)
+      let time = int64(times.epochTime() * 1_000_000_000)
       randomize(time)
 
 {.pop.}