diff --git a/asm/src/main/java/dev/openrs2/asm/ClassVersionUtils.kt b/asm/src/main/java/dev/openrs2/asm/ClassVersionUtils.kt index 54d3adf9a8..5a126fde72 100644 --- a/asm/src/main/java/dev/openrs2/asm/ClassVersionUtils.kt +++ b/asm/src/main/java/dev/openrs2/asm/ClassVersionUtils.kt @@ -9,7 +9,7 @@ object ClassVersionUtils { return swapWords(v1) >= swapWords(v2) } - fun maxVersion(v1: Int, v2: Int): Int { + fun max(v1: Int, v2: Int): Int { return if (gte(v1, v2)) { v1 } else { diff --git a/deob/src/main/java/dev/openrs2/deob/transform/ClassLiteralTransformer.kt b/deob/src/main/java/dev/openrs2/deob/transform/ClassLiteralTransformer.kt index 4418a69afa..b398be6c71 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/ClassLiteralTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/ClassLiteralTransformer.kt @@ -95,7 +95,7 @@ class ClassLiteralTransformer : Transformer() { } } - clazz.version = ClassVersionUtils.maxVersion(clazz.version, Opcodes.V1_5) + clazz.version = ClassVersionUtils.max(clazz.version, Opcodes.V1_5) clazz.fields.removeIf { it.name == getstatic1.name && it.desc == getstatic1.desc } classLiterals++ 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 bbe332eb12..0e6b5ed876 100644 --- a/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt +++ b/deob/src/main/java/dev/openrs2/deob/transform/StaticScramblingTransformer.kt @@ -89,7 +89,7 @@ class StaticScramblingTransformer : Transformer() { val (staticClass, staticClinit) = nextClass() staticClass.fields.addAll(fieldSet.fields) - staticClass.version = ClassVersionUtils.maxVersion(staticClass.version, fieldSet.owner.version) + staticClass.version = ClassVersionUtils.max(staticClass.version, fieldSet.owner.version) if (fieldSet.clinit != null) { // remove tail RETURN @@ -169,7 +169,7 @@ class StaticScramblingTransformer : Transformer() { val (staticClass, _) = nextClass() staticClass.methods.add(method) - staticClass.version = ClassVersionUtils.maxVersion(staticClass.version, clazz.version) + staticClass.version = ClassVersionUtils.max(staticClass.version, clazz.version) val partition = inheritedMethodSets[MemberRef(clazz, method)]!! methodClasses[partition] = staticClass.name