Skip to content

Commit 058bdba

Browse files
committed
Fix off-by-one error in MachO LoadCmd iterator
1 parent 2b58bd3 commit 058bdba

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MachO/MachOLoadCmd.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function MachOLoadCmds(oh::H) where {H <: MachOHandle}
121121
# Begin by seeking to the header offset
122122
seek(oh, sizeof(header(oh)))
123123

124-
for idx in 1:(header(oh).ncmds - 1)
124+
for idx in 1:header(oh).ncmds
125125
# Unpack each load command. First, read in the header:
126126
cmd_header = unpack(oh, MachOLoadCmdHeader{H})
127127

0 commit comments

Comments
 (0)