mirror of
https://github.com/revanced/smali.git
synced 2025-05-19 15:37:06 +02:00
Fix for incorrect goto/16 to goto/32 conversion.
This commit is contained in:
parent
add494945d
commit
6e524ece32
@ -193,7 +193,7 @@ public class InstructionWriteUtil {
|
|||||||
} else if (instruction.getOpcode().format.equals(Format.Format20t) && !offsetToNewInstructionMap.containsKey(currentCodeOffset)) {
|
} else if (instruction.getOpcode().format.equals(Format.Format20t) && !offsetToNewInstructionMap.containsKey(currentCodeOffset)) {
|
||||||
int targetOffset = ((Instruction20t)instruction).getCodeOffset();
|
int targetOffset = ((Instruction20t)instruction).getCodeOffset();
|
||||||
int codeOffsetDelta = codeOffsetShift(currentCodeOffset);
|
int codeOffsetDelta = codeOffsetShift(currentCodeOffset);
|
||||||
int newTargetOffset = targetOffsetShift(currentCodeOffset, targetOffset);
|
int newTargetOffset = targetOffset + targetOffsetShift(currentCodeOffset, targetOffset);
|
||||||
if ((short)newTargetOffset != newTargetOffset) {
|
if ((short)newTargetOffset != newTargetOffset) {
|
||||||
codeOffsetShifts.add(codeOffsetDelta, currentCodeOffset+instruction.getCodeUnits());
|
codeOffsetShifts.add(codeOffsetDelta, currentCodeOffset+instruction.getCodeUnits());
|
||||||
offsetToNewInstructionMap.put(currentCodeOffset, Format.Format30t);
|
offsetToNewInstructionMap.put(currentCodeOffset, Format.Format30t);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user