Skip to content

Commit fbe92a9

Browse files
committed
Random Unification
1 parent 225a149 commit fbe92a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/V8API/JSContext+closure.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extension JSContext {
2323
func generateId() -> Int32 {
2424
var id: Int32 = 0
2525
repeat {
26-
id = Int32(bitPattern: arc4random())
26+
id = Int32.random(in: 0...Int32.max)
2727
} while functions[id] != nil
2828
return id
2929
}

0 commit comments

Comments
 (0)