From 64dc49e15b8042a93607464fc724df20017caec8 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 21 May 2020 15:14:34 +0100 Subject: [PATCH] Delete empty methods Signed-off-by: Graham --- .../openrs2/deob/transform/StaticScramblingTransformer.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt index 73f5cae002..cc7285c741 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt @@ -228,6 +228,11 @@ class StaticScramblingTransformer @Inject constructor(private val profile: Profi methodClasses[partition] = staticClass.name return@removeIf true } + + val first = clinit?.instructions?.firstOrNull { it.opcode != -1 } + if (first != null && first.opcode == Opcodes.RETURN) { + clazz.methods.remove(clinit) + } } spliceInitializers()