mirror of
https://github.com/revanced/smali.git
synced 2025-05-21 16:37:04 +02:00
Initialize the offset of ClassDefItems to -1 before placing them
git-svn-id: https://smali.googlecode.com/svn/trunk@423 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
e88cdf2010
commit
0da75f71eb
@ -268,6 +268,12 @@ public class ClassDefItem extends Item<ClassDefItem> {
|
||||
});
|
||||
}
|
||||
|
||||
//we need to initialize the offset for all the classes to -1, so we can tell which ones
|
||||
//have been placed
|
||||
for (ClassDefItem classDefItem: section.items) {
|
||||
classDefItem.offset = -1;
|
||||
}
|
||||
|
||||
for (ClassDefItem classDefItem: section.items) {
|
||||
placeClass(classDefItem);
|
||||
}
|
||||
|
@ -36,12 +36,12 @@ public abstract class Item<T extends Item> implements Comparable<T> {
|
||||
/**
|
||||
* The offset of this item in the dex file, or -1 if not known
|
||||
*/
|
||||
private int offset = -1;
|
||||
protected int offset = -1;
|
||||
|
||||
/**
|
||||
* The index of this item in the containing section, or -1 if not known
|
||||
*/
|
||||
private int index = -1;
|
||||
protected int index = -1;
|
||||
|
||||
/**
|
||||
* The DexFile that this item is associatedr with
|
||||
|
Loading…
x
Reference in New Issue
Block a user