mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
parent
3ea1276eeb
commit
fe61b19b96
@ -23,11 +23,11 @@ pub fn parse(self: *Archive, macho_file: *MachO, path: []const u8, handle_index:
|
||||
|
||||
const handle = macho_file.getFileHandle(handle_index);
|
||||
const offset = if (fat_arch) |ar| ar.offset else 0;
|
||||
const size = if (fat_arch) |ar| ar.size else (try handle.stat()).size;
|
||||
const end_pos = if (fat_arch) |ar| offset + ar.size else (try handle.stat()).size;
|
||||
|
||||
var pos: usize = offset + SARMAG;
|
||||
while (true) {
|
||||
if (pos >= size) break;
|
||||
if (pos >= end_pos) break;
|
||||
if (!mem.isAligned(pos, 2)) pos += 1;
|
||||
|
||||
var hdr_buffer: [@sizeOf(ar_hdr)]u8 = undefined;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user