mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
Fix copying UTF-16 -> UTF-8 sometimes causing invalid UTF-8 bytes (#20601)
This commit is contained in:
@@ -379,7 +379,6 @@ pub const BufferedWriter = struct {
|
||||
this.remain()[0 .. bytes.len * 2],
|
||||
[]const u16,
|
||||
bytes,
|
||||
true,
|
||||
);
|
||||
this.context.list.items.len += @as(usize, decoded.written);
|
||||
return pending.len;
|
||||
@@ -393,7 +392,6 @@ pub const BufferedWriter = struct {
|
||||
this.remain()[0 .. bytes.len * 2],
|
||||
[]const u16,
|
||||
bytes,
|
||||
true,
|
||||
);
|
||||
this.pos += @as(usize, decoded.written);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user