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 90eab32 commit 5d54b3cCopy full SHA for 5d54b3c
src/builtins.ts
@@ -3524,7 +3524,9 @@ function utf16ToUtf8(str: string) : Uint8Array {
3524
result[utf8Length++] = 0x80 + (codePoint&0x3F);
3525
}
3526
3527
- return result.subarray(0, utf8Length);
+ let trimmed = new Uint8Array(utf8Length);
3528
+ for (let i: i32 = 0; i < utf8Length; ++i) trimmed[i] = result[i];
3529
+ return trimmed;
3530
3531
3532
// memory.dataUTF8(value) -> usize
0 commit comments