Skip to content

Commit c39c3d1

Browse files
committed
compatible with old version of node
1 parent 1440c9d commit c39c3d1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

jscomp/stdlib-406/random.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*)
2727

2828
let random_seed: unit -> int array = fun _ ->
29-
let seed :int = [%raw "Math.floor(Math.random()*0x7fff_ffff)"] in
29+
let seed :int = [%raw "Math.floor(Math.random()*0x7fffffff)"] in
3030
[|seed|]
3131

3232
module State = struct

lib/es6/random.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as Caml_int64 from "./caml_int64.js";
99
import * as Caml_string from "./caml_string.js";
1010

1111
function random_seed(param) {
12-
return [(Math.floor(Math.random()*0x7fff_ffff))];
12+
return [(Math.floor(Math.random()*0x7fffffff))];
1313
}
1414

1515
function assign(st1, st2) {

lib/js/random.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var Caml_int64 = require("./caml_int64.js");
99
var Caml_string = require("./caml_string.js");
1010

1111
function random_seed(param) {
12-
return [(Math.floor(Math.random()*0x7fff_ffff))];
12+
return [(Math.floor(Math.random()*0x7fffffff))];
1313
}
1414

1515
function assign(st1, st2) {

0 commit comments

Comments
 (0)