Skip to content

Commit 7c37c55

Browse files
committed
macho: fix 32bit compilation issues
1 parent 8541119 commit 7c37c55

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
@@ -2475,7 +2475,7 @@ fn writeThunkWorker(self: *MachO, thunk: Thunk) void {
24752475
defer tracy.end();
24762476
const doWork = struct {
24772477
fn doWork(th: Thunk, buffer: []u8, macho_file: *MachO) !void {
2478-
const off = th.value;
2478+
const off = math.cast(usize, th.value) orelse return error.Overflow;
24792479
const size = th.size();
24802480
var stream = std.io.fixedBufferStream(buffer[off..][0..size]);
24812481
try th.write(macho_file, stream.writer());

0 commit comments

Comments
 (0)