From 4468766a9d8c5b5837dae3a561f692466cbdae11 Mon Sep 17 00:00:00 2001 From: Graham Date: Sat, 29 Feb 2020 23:11:56 +0000 Subject: [PATCH] Ensure ACC_SUPER is set in InvokeSpecialTransformer I'm not sure if the transform makes sense if ACC_SUPER is not set. This is just for sanity checking: the client does use ACC_SUPER in all its classes. --- .../dev/openrs2/deob/transform/InvokeSpecialTransformer.kt | 5 +++++ 1 file changed, 5 insertions(+) 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 3d7bc15089..bdf504a5ca 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt @@ -16,6 +16,11 @@ class InvokeSpecialTransformer : Transformer() { invokeSpecialsReplaced = 0 } + override fun transformClass(classPath: ClassPath, library: Library, clazz: ClassNode): Boolean { + require(clazz.access and (Opcodes.ACC_SUPER or Opcodes.ACC_INTERFACE) != 0) + return false + } + override fun transformCode(classPath: ClassPath, library: Library, clazz: ClassNode, method: MethodNode): Boolean { for (insn in method.instructions) { if (insn !is MethodInsnNode || insn.opcode != Opcodes.INVOKESPECIAL) {