remove magic constant

This commit is contained in:
Folkert 2022-09-24 14:40:36 +02:00
parent f88dc0308b
commit 51f8bf496f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -84,10 +84,10 @@ pub(crate) fn preprocess_windows(
}
};
// -2 because we added 2 sections, -1 because we have a count and want an index
// -1 because we have a count and want an index
let last_host_section = dynhost_obj
.sections()
.nth(dynhost_obj.sections().count() - 2 - 1)
.nth(dynhost_obj.sections().count() - new_sections.len() - 1)
.unwrap();
let dynamic_relocations = DynamicRelocationsPe::new(dynhost_data);