commit 83a668195526df745362b1174bfd643a0cdfb128 (tree)
parent de81c504b187279e6daba30df9673835f7f6c1eb
Author: Andrew Kelley <andrew@ziglang.org>
Date: Tue, 7 Dec 2021 17:03:29 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/link/MachO.zig b/src/link/MachO.zig
@@ -1985,7 +1985,7 @@ fn writeAllAtoms(self: *MachO) !void {
var buffer = std.ArrayList(u8).init(self.base.allocator);
defer buffer.deinit();
- try buffer.ensureTotalCapacity(sect.size);
+ try buffer.ensureTotalCapacity(try math.cast(usize, sect.size));
log.debug("writing atoms in {s},{s}", .{ commands.segmentName(sect), commands.sectionName(sect) });