deob: fix renaming of class types in ldc

This commit is contained in:
ThatGamerBlue
2021-02-25 23:13:55 +00:00
parent 7c00707fc0
commit 62df7e0ff1

View File

@@ -34,6 +34,7 @@ import net.runelite.asm.execution.InstructionContext;
import net.runelite.asm.execution.Stack;
import net.runelite.asm.execution.StackContext;
import net.runelite.asm.execution.Value;
import net.runelite.asm.pool.Class;
import org.objectweb.asm.MethodVisitor;
import static org.objectweb.asm.Opcodes.DCONST_0;
import static org.objectweb.asm.Opcodes.DCONST_1;
@@ -181,4 +182,17 @@ public class LDC extends Instruction implements PushConstantInstruction
{
return (Number) value;
}
@Override
public void renameClass(String oldName, String newName)
{
Object object = getConstant();
if (object instanceof net.runelite.asm.pool.Class)
{
if (((Class) object).getName().equals(oldName))
{
value = new Class(newName);
}
}
}
}