Skip to content

Commit

Permalink
Fix to compile with latest Nim devel (0.17.3)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbernard authored and endragor committed Nov 16, 2017
1 parent 156907e commit 45a5cbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion isaac.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Package]
name: "isaac"
version: "0.1.2"
version: "0.1.3"
author: "Xored Software, Inc."
description: "ISAAC PRNG implementation"
license: "MIT"
Expand Down
4 changes: 2 additions & 2 deletions src/isaac.nim
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ proc regen(gen: IsaacGenerator) =
inc cc # cc just gets incremented once per 256 results
bb = bb + cc # then combined with bb

for i in 0..<isaacStateSize:
for i in 0'u32..<isaacStateSize:
let x = gen.state[i]
case (i and 3):
of 0: aa = aa xor (aa shl 13)
Expand All @@ -67,7 +67,7 @@ proc regen(gen: IsaacGenerator) =

template initPass(seed, result: array[isaacStateSize, uint32];
a, b, c, d, e, f, g, h: uint32) =
for i in countup(0, isaacStateSize - 1, 8):
for i in countup(0'u32, isaacStateSize - 1, 8):
a += seed[i]
b += seed[i + 1]
c += seed[i + 2]
Expand Down

0 comments on commit 45a5cbb

Please sign in to comment.