Skip to content

Commit

Permalink
Merge pull request #4 from CuriousTommy/borrowmuterror_lcsegment_fix
Browse files Browse the repository at this point in the history
Fix "already borrowed" Error For LC_SEGMENT
  • Loading branch information
Arsynth committed Dec 10, 2023
2 parents 189bd63 + 99afa5a commit 45866cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/types/load_command/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ impl LcVariant {
// We assume reader already stay right after `cmd` and `cmdsize`
match cmd {
LC_SEGMENT => {
std::mem::drop(reader_mut);
let c = LcSegment::parse(reader_clone, base_offset, object_file_offset, X64Context::Off(endian))?;
Ok(Self::Segment32(c))
}
Expand Down

0 comments on commit 45866cf

Please sign in to comment.