mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 17:14:25 +02:00
- Fixed an issue when decoding the index for instructions that contain an indexed item references
git-svn-id: https://smali.googlecode.com/svn/trunk@175 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
1c9fcdee6d
commit
8bb1d77b66
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -52,6 +52,19 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<configuration>
|
||||
<descriptorRefs>
|
||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||
</descriptorRefs>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>org.jf.smali.main</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
|
Loading…
x
Reference in New Issue
Block a user