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.
bzip2
Graham 5 years ago
parent ccb37f120b
commit 4468766a9d
  1. 5
      deob/src/main/java/dev/openrs2/deob/transform/InvokeSpecialTransformer.kt

@ -16,6 +16,11 @@ class InvokeSpecialTransformer : Transformer() {
invokeSpecialsReplaced = 0 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 { override fun transformCode(classPath: ClassPath, library: Library, clazz: ClassNode, method: MethodNode): Boolean {
for (insn in method.instructions) { for (insn in method.instructions) {
if (insn !is MethodInsnNode || insn.opcode != Opcodes.INVOKESPECIAL) { if (insn !is MethodInsnNode || insn.opcode != Opcodes.INVOKESPECIAL) {

Loading…
Cancel
Save