diff options
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r-- | src/string_immutable.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 321abb9f7..f4c6fae07 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -2146,7 +2146,7 @@ pub fn escapeHTMLForLatin1Input(allocator: std.mem.Allocator, latin1: []const u8 buf = try std.ArrayList(u8).initCapacity(allocator, latin1.len + @as(usize, Scalar.lengths[c])); const copy_len = @ptrToInt(ptr) - @ptrToInt(latin1.ptr); - @memcpy(buf.items.ptr, latin1.ptr, copy_len - 1); + @memcpy(buf.items.ptr, latin1.ptr, copy_len); buf.items.len = copy_len; any_needs_escape = true; break :scan_and_allocate_lazily; |