mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 17:14:25 +02:00
Fixed an issue with generated dex files that have no field references
git-svn-id: https://smali.googlecode.com/svn/trunk@57 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
4fd96cb22d
commit
56c3e45ad4
@ -55,8 +55,15 @@ public abstract class SectionHeaderInfo extends CompositeField<SectionHeaderInfo
|
||||
if (!section.isPlaced()) {
|
||||
throw new RuntimeException("Trying to write a reference to a section that hasn't been placed.");
|
||||
}
|
||||
int size = section.size();
|
||||
sectionSizeField.cacheValue(section.size());
|
||||
sectionOffsetField.cacheValue(section.getOffset());
|
||||
|
||||
if (size == 0) {
|
||||
//we have to set the offset to 0 or dalvik will complain
|
||||
sectionOffsetField.cacheValue(0);
|
||||
} else {
|
||||
sectionOffsetField.cacheValue(section.getOffset());
|
||||
}
|
||||
|
||||
super.writeTo(out);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user