Skip to content

Commit

Permalink
fix: correct skip size for sparse switch payload
Browse files Browse the repository at this point in the history
  • Loading branch information
skylot committed May 27, 2020
1 parent 15776c4 commit 7d29c5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import jadx.core.dex.nodes.RootNode;
import jadx.core.dex.visitors.typeinference.TypeCompareEnum;
import jadx.core.utils.Utils;
import jadx.core.utils.exceptions.JadxRuntimeException;

public abstract class ArgType {
public static final ArgType INT = primitive(PrimitiveType.INT);
Expand Down Expand Up @@ -645,6 +646,9 @@ public static ArgType convertFromPrimitiveType(PrimitiveType primitiveType) {
}

public static ArgType parse(String type) {
if (type == null || type.isEmpty()) {
throw new JadxRuntimeException("Failed to parse type string: " + type);
}
char f = type.charAt(0);
switch (f) {
case 'L':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public void decode(DexInsnData insn, int opcodeUnit, SectionReader in) {
@Override
public void skip(DexInsnData insn, SectionReader in) {
int size = in.readUShort();
in.skip(4 + size * 4 * 2);
in.skip(size * 8);
insn.setLength(size * 4 + 2);
}
};
Expand Down

0 comments on commit 7d29c5d

Please sign in to comment.