mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Replace Math.random with crypto.getRandomValues for _system_number
This commit is contained in:
Vendored
-1
@@ -1350,7 +1350,6 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
|
||||
exp: Math.exp,
|
||||
ldexp: (x, exp) => x * Math.pow(2, exp),
|
||||
|
||||
rand: Math.random,
|
||||
rand_bytes: (ptr, len) => {
|
||||
const view = new Uint8Array(wasmMemoryInterface.memory.buffer, ptr, len)
|
||||
crypto.getRandomValues(view)
|
||||
|
||||
Reference in New Issue
Block a user