Skip to content

Commit 0dfa5d2

Browse files
fix(bindgen): utf16 decode logic
1 parent 68d353d commit 0dfa5d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • crates/js-component-bindgen/src/intrinsics

crates/js-component-bindgen/src/intrinsics/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl StringIntrinsic {
115115
let ptr = {realloc_call}(0, 0, 1, bytes.byteLength);
116116
new Uint8Array(memory.buffer).set(bytes, ptr);
117117
118-
const res = {{ ptr, len: buf.length, codepoints: [...s].length }};
118+
const res = {{ ptr, len: bytes.length, codepoints: [...s].length }};
119119
return res;
120120
}}
121121
"#

0 commit comments

Comments
 (0)