We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 914c241 commit 3ab076dCopy full SHA for 3ab076d
src/utils/parseArgs.js
@@ -1,7 +1,7 @@
1
module.exports = (Core, args) => {
2
const argsPtr = Core._malloc(args.length * Uint32Array.BYTES_PER_ELEMENT);
3
args.forEach((s, idx) => {
4
- const sz = s.length*4 + 1;
+ const sz = Core.lengthBytesUTF8(s) + 1;
5
const buf = Core._malloc(sz);
6
Core.stringToUTF8(s, buf, sz);
7
Core.setValue(argsPtr + (Uint32Array.BYTES_PER_ELEMENT * idx), buf, 'i32');
0 commit comments