Skip to content

Commit 83a6681

Browse files
committed
link: fix build for 32-bit targets
This wasn't caught by the CI checks because this function is is only called for the `use_stage1` codepath.
1 parent de81c50 commit 83a6681

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/link/MachO.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ fn writeAllAtoms(self: *MachO) !void {
19851985

19861986
var buffer = std.ArrayList(u8).init(self.base.allocator);
19871987
defer buffer.deinit();
1988-
try buffer.ensureTotalCapacity(sect.size);
1988+
try buffer.ensureTotalCapacity(try math.cast(usize, sect.size));
19891989

19901990
log.debug("writing atoms in {s},{s}", .{ commands.segmentName(sect), commands.sectionName(sect) });
19911991

0 commit comments

Comments
 (0)