Skip to content

Commit

Permalink
Fix 32-bit path (unnecessary use of wrong mask)
Browse files Browse the repository at this point in the history
  • Loading branch information
dra27 committed Mar 15, 2021
1 parent 213b920 commit 9352d81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/random.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ module State = struct
(* 32 random bits on both 64-bit OCaml and JavaScript.
Use upper 16 bits of b1 and b2. *)
let bpos =
(((b2 land 0x3FFFC000) lsl 2) lor (b1 lsr 14)) land max_int_32
(((b2 land 0x3FFFC000) lsl 2) lor (b1 lsr 14))
in
(bpos, max_int_32)
else
Expand Down

0 comments on commit 9352d81

Please sign in to comment.