Skip to content

Commit

Permalink
Use the space given by the PE's FileAlignment
Browse files Browse the repository at this point in the history
Resolve #1088
  • Loading branch information
romainthomas committed Aug 25, 2024
1 parent ecbedb4 commit 63d9e94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/PE/Binary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void Binary::make_space_for_new_section() {
for (std::unique_ptr<Section>& section : sections_) {
section->pointerto_raw_data(section->pointerto_raw_data() + shift);
}
available_sections_space_++;
available_sections_space_ = shift / sizeof(details::pe_section);
}

Section* Binary::add_section(const Section& section, PE_SECTION_TYPES type) {
Expand Down

0 comments on commit 63d9e94

Please sign in to comment.