mirror of
https://github.com/revanced/smali.git
synced 2025-05-09 19:04:32 +02:00
fix an issue reading the string index for indexes >16bits, for the const-string/jumbo opcode
git-svn-id: https://smali.googlecode.com/svn/trunk@495 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
8fc44f0bbc
commit
b6ce091ae3
@ -54,6 +54,10 @@ public class Instruction31c extends InstructionWithReference implements SingleRe
|
|||||||
super(dexFile, opcode, buffer, bufferIndex);
|
super(dexFile, opcode, buffer, bufferIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int getReferencedItemIndex() {
|
||||||
|
return NumberUtils.decodeInt(buffer, bufferIndex + 2);
|
||||||
|
}
|
||||||
|
|
||||||
public Format getFormat() {
|
public Format getFormat() {
|
||||||
return Format.Format31c;
|
return Format.Format31c;
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,14 @@ public abstract class InstructionWithReference extends Instruction {
|
|||||||
protected InstructionWithReference(DexFile dexFile, Opcode opcode, byte[] buffer, int bufferIndex) {
|
protected InstructionWithReference(DexFile dexFile, Opcode opcode, byte[] buffer, int bufferIndex) {
|
||||||
super(opcode, buffer, bufferIndex);
|
super(opcode, buffer, bufferIndex);
|
||||||
|
|
||||||
int itemIndex = NumberUtils.decodeUnsignedShort(buffer, bufferIndex + 2);
|
int itemIndex = getReferencedItemIndex();
|
||||||
lookupReferencedItem(dexFile, opcode, itemIndex);
|
lookupReferencedItem(dexFile, opcode, itemIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int getReferencedItemIndex() {
|
||||||
|
return NumberUtils.decodeUnsignedShort(buffer, bufferIndex + 2);
|
||||||
|
}
|
||||||
|
|
||||||
public Item getReferencedItem() {
|
public Item getReferencedItem() {
|
||||||
return referencedItem;
|
return referencedItem;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user