Compilation: fix incorrect saved buf count

Change-Id: Ib2a2ffcb6224e571fed1151e687d8a8efe0bb95b
This commit is contained in:
Bingwu Zhang 2025-11-22 22:12:59 +08:00 committed by xtex
parent a38220376e
commit 22e55f78f0
No known key found for this signature in database
GPG key ID: B918086ED8045B91

View file

@ -3693,7 +3693,7 @@ pub fn saveState(comp: *Compilation) !void {
},
});
try bufs.ensureTotalCapacityPrecise(14 + 8 * pt_headers.items.len);
try bufs.ensureTotalCapacityPrecise(22 + 9 * pt_headers.items.len);
addBuf(&bufs, mem.asBytes(&header));
addBuf(&bufs, @ptrCast(pt_headers.items));