diff --git a/dexlib/src/main/java/org/jf/dexlib/code/Instruction.java b/dexlib/src/main/java/org/jf/dexlib/code/Instruction.java index d16490c8..8dbe7978 100644 --- a/dexlib/src/main/java/org/jf/dexlib/code/Instruction.java +++ b/dexlib/src/main/java/org/jf/dexlib/code/Instruction.java @@ -29,6 +29,7 @@ package org.jf.dexlib.code; import org.jf.dexlib.*; +import org.jf.dexlib.util.NumberUtils; import org.jf.dexlib.code.Format.Format; public abstract class Instruction { @@ -84,7 +85,7 @@ public abstract class Instruction { System.arraycopy(rest, 0, encodedInstruction, 1, rest.length); if (opcode.referenceType != ReferenceType.none) { - int itemIndex = (encodedInstruction[3] << 8) | encodedInstruction[2]; + int itemIndex = NumberUtils.decodeUnsignedShort(encodedInstruction[2], encodedInstruction[3]); getReferencedItem(dexFile, opcode, itemIndex); } } diff --git a/smali/pom.xml b/smali/pom.xml index 5532beed..6073a0b3 100644 --- a/smali/pom.xml +++ b/smali/pom.xml @@ -52,6 +52,19 @@ + + maven-assembly-plugin + + + jar-with-dependencies + + + + org.jf.smali.main + + + +