From 507f2d0ab154fabe3d81c80e74aa82a59fff837b Mon Sep 17 00:00:00 2001 From: Matthew Lugg Date: Sat, 15 Aug 2026 08:59:07 +0100 Subject: [PATCH] MappedFile: fix bug in growing fixed nodes --- src/link/MappedFile.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/link/MappedFile.zig b/src/link/MappedFile.zig index 38636f01145e57f7deb260c919e0ff180c900bbf..a6b86e2fc7ac35353027705400fc95e63e229587 100644 --- a/src/link/MappedFile.zig +++ b/src/link/MappedFile.zig @@ -1023,9 +1023,10 @@ fn resizeNode( } try mf.ensureCapacityForSetLocation(gpa); if (parent.last != first_floating_ni) { - first_floating.prev = parent.last; + const old_last = parent.last; + first_floating.prev = old_last; parent.last = first_floating_ni; - try parent.last.setNext(gpa, first_floating_ni, mf); + try old_last.setNext(gpa, first_floating_ni, mf); try last_fixed_ni.setNext(gpa, first_floating.next, mf); switch (first_floating.next) { .none => {}, -- 2.54.0