Skip to content

Commit

Permalink
Better warning
Browse files Browse the repository at this point in the history
# Conflicts:
#	dex-reader/src/main/java/com/googlecode/d2j/reader/DexFileReader.java
  • Loading branch information
ThexXTURBOXx authored and pxb1988 committed Aug 30, 2023
1 parent 31f4430 commit bc39f20
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,6 @@ public abstract interface DexConstants {
int DEX_036 = 0x00303336;
int DEX_037 = 0x00303337;
int DEX_038 = 0x00303338;
int DEX_039 = 0x00303339;
int DEX_040 = 0x00303340;
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@ public DexFileReader(ByteBuffer in) {
throw new DexException("not support magic.");
}
int version = in.getInt() >> 8;
if (version < 0 || version < DEX_035) {
throw new DexException("not support version.");
if (version < DEX_035 || version > DEX_040) {
System.err.println("Unknown DEX version. Trying anyway...");
}
this.dex_version = version;
in.order(ByteOrder.LITTLE_ENDIAN);
Expand Down

0 comments on commit bc39f20

Please sign in to comment.