diff --git a/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt b/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt index 01218501..64e7507d 100644 --- a/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt +++ b/asm/src/main/java/dev/openrs2/asm/remap/ClassForNameRemapper.kt @@ -1,6 +1,8 @@ package dev.openrs2.asm.remap import dev.openrs2.asm.InsnMatcher +import dev.openrs2.asm.toBinaryClassName +import dev.openrs2.asm.toInternalClassName import org.objectweb.asm.commons.Remapper import org.objectweb.asm.tree.AbstractInsnNode import org.objectweb.asm.tree.LdcInsnNode @@ -25,9 +27,9 @@ object ClassForNameRemapper { fun remap(remapper: Remapper, method: MethodNode) { for (match in INVOKE_MATCHER.match(method).filter(ClassForNameRemapper::isClassForName)) { val ldc = match[0] as LdcInsnNode - val name = remapper.map(ldc.cst as String) + val name = remapper.map((ldc.cst as String).toInternalClassName()) if (name != null) { - ldc.cst = name + ldc.cst = name.toBinaryClassName() } } }