Use wasmMemoryInterface for rand_bytes
This commit is contained in:
1 parent
166803a2a5
commit
8b2f62000a
1 file changed
+1
-1
Vendored
+1
-1
@@ -1352,7 +1352,7 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
|
||||
|
||||
rand: Math.random,
|
||||
rand_bytes: (ptr, len) => {
|
||||
const view = new Uint8Array(wasm_memory.buffer, ptr, len)
|
||||
const view = new Uint8Array(wasmMemoryInterface.memory.buffer, ptr, len)
|
||||
crypto.getRandomValues(view)
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user