Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/MachO/MachOFat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ keys(h::FatMachOHandle) = 1:length(h)
iterate(h::FatMachOHandle, idx=1) = idx > length(h) ? nothing : (h[idx], idx+1)
lastindex(h::FatMachOHandle) = lastindex(h.header.archs)
length(h::FatMachOHandle) = length(h.header.archs)
eltype(::Type{S}) where {S <: FatMachOHandle} = MachOLoadCmdRef
eltype(::Type{<:FatMachOHandle}) = MachOHandle
function getindex(h::FatMachOHandle, idx)
seek(h.io, h.start + h.header.archs[idx].offset)
only(readmeta(h.io, MachOHandle))
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,10 @@ function test_fat_libfoo(file)
end
@test ntotal == 2
@test n64 == 1

handles = collect(ohs)
@test handles isa Vector{<:MachOHandle}
@test length(handles) == 2
end

function test_metal(file)
Expand Down
Loading