mirror of
https://github.com/revanced/smali.git
synced 2025-05-05 00:54:25 +02:00
The stored offset is a relative offset from the position of the instruction, not an absolute offset
git-svn-id: https://smali.googlecode.com/svn/trunk@364 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
416b72fc74
commit
814580d4cf
@ -218,11 +218,11 @@ public class MethodDefinition {
|
||||
if (opcode == Opcode.PACKED_SWITCH) {
|
||||
Instruction31t ins = (Instruction31t)opcode.format.Factory.makeInstruction(
|
||||
methodIdItem.getDexFile(), opcode, encodedInstructions, index);
|
||||
packedSwitchMap.put(ins.getOffset(), index/2);
|
||||
packedSwitchMap.put(index/2 + ins.getOffset(), index/2);
|
||||
} else if (opcode == Opcode.SPARSE_SWITCH) {
|
||||
Instruction31t ins = (Instruction31t)opcode.format.Factory.makeInstruction(
|
||||
methodIdItem.getDexFile(), opcode, encodedInstructions, index);
|
||||
sparseSwitchMap.put(ins.getOffset(), index/2);
|
||||
sparseSwitchMap.put(index/2 + ins.getOffset(), index/2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user