From b76384351c55917692a9dc3b7f08f771a55b3fa1 Mon Sep 17 00:00:00 2001 From: Jarred Sumner Date: Tue, 28 Mar 2023 18:23:50 -0700 Subject: More bug fixes (#2486) * readline_promises test fix * fix `escapeHTML` for baseline builds * fs test fixes, use `tmpdir()` * add paths for `resolve.test.js` * isError with toString symbol and error prototype * comment about `toString` * skip async macro transform * test cleanup, skip stack format test * readline undo and redo fix * capture error from readline keypress * Update tcp-server.test.ts * use `removefileat` for recursive rmdir * use strong for `signal.reason` * initialize `m_flags` * directory with file fs test * recursive option * import expect * could be less than * move abort signal tests to another process * fix typecheck --------- Co-authored-by: Dylan Conway --- src/string_immutable.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/string_immutable.zig') 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; -- cgit v1.2.3