Fixed querying for odex version.

This commit is contained in:
Izzat Bahadirov 2013-04-22 17:20:26 -04:00
parent 6cf22f1eac
commit d4e3ab3fd5
2 changed files with 2 additions and 2 deletions

View File

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

View File

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