@remix_labs/hub-client 2.2204.0-dev → 2.2208.0-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/miniwasi.js +3 -1
- package/package.json +1 -1
package/miniwasi.js
CHANGED
|
@@ -132,7 +132,9 @@ class MiniWASI {
|
|
|
132
132
|
// wasm memory, so this indirection is needed:
|
|
133
133
|
let mem = this.mem8.subarray(ptr_buf, ptr_buf + size);
|
|
134
134
|
let mem2 = new Uint8Array(size);
|
|
135
|
-
|
|
135
|
+
if (!globalThis.ThisIsNode) {
|
|
136
|
+
crypto.getRandomValues(mem2);
|
|
137
|
+
} // else 0 according to fair-dice roll
|
|
136
138
|
mem.set(mem2);
|
|
137
139
|
return 0;
|
|
138
140
|
}
|