diff --git a/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt index bdf504a5ca..64db8e9483 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt @@ -22,6 +22,10 @@ class InvokeSpecialTransformer : Transformer() { } override fun transformCode(classPath: ClassPath, library: Library, clazz: ClassNode, method: MethodNode): Boolean { + if ((clazz.access and Opcodes.ACC_FINAL) == 0) { + return false + } + for (insn in method.instructions) { if (insn !is MethodInsnNode || insn.opcode != Opcodes.INVOKESPECIAL) { continue @@ -31,11 +35,6 @@ class InvokeSpecialTransformer : Transformer() { continue } - val owner = classPath.getNode(insn.owner)!! - if ((owner.access and Opcodes.ACC_FINAL) == 0) { - continue - } - insn.opcode = Opcodes.INVOKEVIRTUAL invokeSpecialsReplaced++ }