mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
add padding bytes
This commit is contained in:
@@ -1499,7 +1499,7 @@ pub fn toUTF8ListWithType(list_: std.ArrayList(u8), comptime Type: type, utf16:
|
||||
if (bun.FeatureFlags.use_simdutf and comptime Type == []const u16) {
|
||||
var list = list_;
|
||||
const length = bun.simdutf.length.utf8.from.utf16.le(utf16);
|
||||
try list.ensureTotalCapacityPrecise(length);
|
||||
try list.ensureTotalCapacityPrecise(length + 16);
|
||||
return convertUTF16ToUTF8(list, Type, utf16);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user