mirror of
https://github.com/revanced/smali.git
synced 2025-05-22 19:08:52 +02:00
Increment the reader by the correct amount for payload instructions
This commit is contained in:
parent
f8a63e41aa
commit
a8ef706d1d
@ -326,7 +326,7 @@ public abstract class DexBackedInstruction {
|
||||
int instructionStartOffset = reader.getOffset() - 2;
|
||||
DexBackedPackedSwitchPayload instruction =
|
||||
new DexBackedPackedSwitchPayload(reader.getDexBuffer(), instructionStartOffset);
|
||||
reader.moveRelative(instruction.getCodeUnits() * 2);
|
||||
reader.setOffset(instructionStartOffset + instruction.getCodeUnits() * 2);
|
||||
return instruction;
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ public abstract class DexBackedInstruction {
|
||||
int instructionStartOffset = reader.getOffset() - 2;
|
||||
DexBackedSparseSwitchPayload instruction =
|
||||
new DexBackedSparseSwitchPayload(reader.getDexBuffer(), instructionStartOffset);
|
||||
reader.moveRelative(instruction.getCodeUnits() * 2);
|
||||
reader.setOffset(instructionStartOffset + instruction.getCodeUnits() * 2);
|
||||
return instruction;
|
||||
}
|
||||
|
||||
@ -345,7 +345,7 @@ public abstract class DexBackedInstruction {
|
||||
// the reader is currently positioned after the 2-byte "opcode"
|
||||
int instructionStartOffset = reader.getOffset() - 2;
|
||||
DexBackedArrayPayload instruction = new DexBackedArrayPayload(reader.getDexBuffer(), instructionStartOffset);
|
||||
reader.moveRelative(instruction.getCodeUnits() * 2);
|
||||
reader.setOffset(instructionStartOffset + instruction.getCodeUnits() * 2);
|
||||
return instruction;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user