mirror of
https://github.com/revanced/smali.git
synced 2025-05-02 23:54:38 +02:00
Fixed querying for odex version.
This commit is contained in:
parent
6cf22f1eac
commit
d4e3ab3fd5
@ -123,7 +123,7 @@ public class DexBackedOdexFile extends DexBackedDexFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public int getVersion() {
|
public int getVersion() {
|
||||||
return HeaderItem.getVersion(getBuf(), 0);
|
return OdexHeaderItem.getVersion(odexBuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class NotAnOdexFile extends RuntimeException {
|
public static class NotAnOdexFile extends RuntimeException {
|
||||||
|
@ -219,7 +219,7 @@ public class HeaderItem {
|
|||||||
return "Invalid";
|
return "Invalid";
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getVersion(byte[] buf, int offset) {
|
private static int getVersion(byte[] buf, int offset) {
|
||||||
if (buf.length - offset < 8) {
|
if (buf.length - offset < 8) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user