fix data offset

This commit is contained in:
Jean-Marie 'Histausse' Mineau 2024-01-25 15:50:58 +01:00
parent 832f6b7711
commit 3a9499cc5c
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -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