diff --git a/androscalpel/src/dex_writer.rs b/androscalpel/src/dex_writer.rs index 4e9b46a..7f5b97a 100644 --- a/androscalpel/src/dex_writer.rs +++ b/androscalpel/src/dex_writer.rs @@ -2382,9 +2382,9 @@ impl DexWriter { method.code_off.0 += self.section_manager.get_offset(Section::CodeItem) - 1; } } - linked_local_offset += data.size() as u32; self.corrected_class_data_offset .insert(unlinked_local_offset, linked_local_offset); + linked_local_offset += data.size() as u32; unlinked_local_offset += unlinked_size; // TODO: update section manager even if read only? seams like a bad idea but // this invalidate the size of the section and the offset of the hidden api