aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-07-18 16:30:58 -0700
committerGravatar Dylan Conway <dylan.conway567@gmail.com> 2023-07-18 16:30:58 -0700
commitf494e1b50d1d1b2d49998af0ef9b2b8f12b47620 (patch)
treeb033e290adb9f991d75df2f75a4e3ee9f118fec0
parent112f01ca613bd8c693083ef731b8edde6028eb0a (diff)
downloadbun-f494e1b50d1d1b2d49998af0ef9b2b8f12b47620.tar.gz
bun-f494e1b50d1d1b2d49998af0ef9b2b8f12b47620.tar.zst
bun-f494e1b50d1d1b2d49998af0ef9b2b8f12b47620.zip
add padding bytes
-rw-r--r--src/string_immutable.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig
index 9ca60c860..c967544c7 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);
}