From 1272d7b26363f0cd698080c68bf7f451918c764e Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 12 Feb 2016 15:00:41 -0500 Subject: [PATCH] Compare method signatures when comparing invokes --- .../deob/attributes/code/instructions/InvokeInterface.java | 3 +++ .../deob/attributes/code/instructions/InvokeSpecial.java | 3 +++ .../deob/attributes/code/instructions/InvokeStatic.java | 3 +++ .../deob/attributes/code/instructions/InvokeVirtual.java | 3 +++ 4 files changed, 12 insertions(+) diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeInterface.java b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeInterface.java index 50e8d56b6c..577d060ee5 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeInterface.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeInterface.java @@ -182,6 +182,9 @@ public class InvokeInterface extends Instruction implements InvokeInstruction InvokeInterface thisIi = (InvokeInterface) thisIc.getInstruction(), otherIi = (InvokeInterface) otherIc.getInstruction(); + if (!thisIi.method.getNameAndType().getDescriptor().equals(otherIi.method.getNameAndType().getDescriptor())) + return false; + List thisMethods = thisIi.getMethods(), otherMethods = otherIi.getMethods(); diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeSpecial.java b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeSpecial.java index 9948886f49..3a95e8cdb0 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeSpecial.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeSpecial.java @@ -182,6 +182,9 @@ public class InvokeSpecial extends Instruction implements InvokeInstruction InvokeSpecial thisIi = (InvokeSpecial) thisIc.getInstruction(), otherIi = (InvokeSpecial) otherIc.getInstruction(); + if (!thisIi.method.getNameAndType().getDescriptor().equals(otherIi.method.getNameAndType().getDescriptor())) + return false; + List thisMethods = thisIi.getMethods(), otherMethods = otherIi.getMethods(); diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeStatic.java b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeStatic.java index d627057792..5960585200 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeStatic.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeStatic.java @@ -184,6 +184,9 @@ public class InvokeStatic extends Instruction implements InvokeInstruction InvokeStatic thisIi = (InvokeStatic) thisIc.getInstruction(), otherIi = (InvokeStatic) otherIc.getInstruction(); + if (!thisIi.method.getNameAndType().getDescriptor().equals(otherIi.method.getNameAndType().getDescriptor())) + return false; + List thisMethods = thisIi.getMethods(), otherMethods = otherIi.getMethods(); diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeVirtual.java b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeVirtual.java index b8d14e5859..006163810e 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeVirtual.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/InvokeVirtual.java @@ -205,6 +205,9 @@ public class InvokeVirtual extends Instruction implements InvokeInstruction InvokeVirtual thisIi = (InvokeVirtual) thisIc.getInstruction(), otherIi = (InvokeVirtual) otherIc.getInstruction(); + if (!thisIi.method.getNameAndType().getDescriptor().equals(otherIi.method.getNameAndType().getDescriptor())) + return false; + List thisMethods = thisIi.getMethods(), otherMethods = otherIi.getMethods();