Skip to content

Commit 716ed0d

Browse files
committed
Hotfix for double encodeInto call
This was a regression introduced in the last commit of #1470, which might make Unicode strings 2x slower to pass.
1 parent 15defcf commit 716ed0d

File tree

1 file changed

+1
-1
lines changed
  • crates/cli-support/src/js

1 file changed

+1
-1
lines changed

crates/cli-support/src/js/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ impl<'a> Context<'a> {
15011501
const view = getUint8Memory().subarray(ptr + offset, ptr + size);
15021502
const ret = cachedTextEncoder.encodeInto(arg, view);
15031503
{}
1504-
offset += cachedTextEncoder.encodeInto(arg, view).written;
1504+
offset += ret.written;
15051505
}}
15061506
WASM_VECTOR_LEN = offset;
15071507
return ptr;

0 commit comments

Comments
 (0)