mirror of
https://github.com/revanced/smali.git
synced 2025-05-23 18:16:23 +02:00
Sort the ClassDefItems by offset after placing them
git-svn-id: https://smali.googlecode.com/svn/trunk@421 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
af88d65aac
commit
59cc9d09b7
@ -40,6 +40,7 @@ import java.security.NoSuchAlgorithmException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Collections;
|
||||
import java.util.zip.Adler32;
|
||||
|
||||
/**
|
||||
@ -599,6 +600,13 @@ public class DexFile
|
||||
|
||||
int ret = ClassDefItem.placeClassDefItems(this, offset);
|
||||
|
||||
Collections.sort(this.items, new Comparator<ClassDefItem>() {
|
||||
|
||||
public int compare(ClassDefItem a, ClassDefItem b) {
|
||||
return a.getOffset() - b.getOffset();
|
||||
}
|
||||
});
|
||||
|
||||
this.offset = items.get(0).getOffset();
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user