Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyan-dfinity committed Jul 22, 2023
1 parent 3c80da4 commit 18e9e1e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions collections/motoko/mops.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[dependencies]
base = "https://github.com/dfinity/motoko-base#moc-0.9.7"
stableheapbtreemap = "1.3.0"
stable-hash-map = "0.0.1"
splay = "0.1.0"
4 changes: 2 additions & 2 deletions collections/motoko/src/random.mo
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Prim "mo:⛔";

module {
public class new(size: ?Nat32, seed: Nat32) {
let modulus : Nat32 = 0x7fffffff;
let modulus : Nat32 = 0x7fffffff;
var state : Nat32 = seed;
var ind : Nat32 = 0;

Expand All @@ -18,7 +18,7 @@ module {
};
};
};
state := state * 48271 % modulus;
state := state *% 48271 % modulus;
?state;
};
};
Expand Down

0 comments on commit 18e9e1e

Please sign in to comment.