From f494e1b50d1d1b2d49998af0ef9b2b8f12b47620 Mon Sep 17 00:00:00 2001 From: Dylan Conway Date: Tue, 18 Jul 2023 16:30:58 -0700 Subject: [PATCH] add padding bytes --- src/string_immutable.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 9ca60c860c..c967544c74 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -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); }