mirror of
https://github.com/revanced/smali.git
synced 2025-05-04 16:44:25 +02:00
Treat unknown opcodes as nops
This commit is contained in:
parent
9069177bff
commit
2f81aec886
@ -53,9 +53,10 @@ public class InstructionIterator {
|
||||
Instruction instruction = null;
|
||||
|
||||
if (opcode == null) {
|
||||
throw new RuntimeException("Unknown opcode: " + Hex.u1(insns[insnsPosition]));
|
||||
}
|
||||
|
||||
System.err.println(String.format("unknown opcode encountered - %x. Treating as nop.",
|
||||
(opcodeValue & 0xFFFF)));
|
||||
instruction = new Instruction10x(Opcode.NOP, insns, insnsPosition);
|
||||
} else {
|
||||
if (opcode == Opcode.NOP) {
|
||||
byte secondByte = insns[insnsPosition + 1];
|
||||
switch (secondByte) {
|
||||
@ -83,6 +84,7 @@ public class InstructionIterator {
|
||||
} else {
|
||||
instruction = opcode.format.Factory.makeInstruction(dexFile, opcode, insns, insnsPosition);
|
||||
}
|
||||
}
|
||||
|
||||
assert instruction != null;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user