diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/IfACmpNe.java b/src/main/java/net/runelite/deob/attributes/code/instructions/IfACmpNe.java index 2b8724cc40..00ec4f698a 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/IfACmpNe.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/IfACmpNe.java @@ -19,7 +19,7 @@ public class IfACmpNe extends If if (super.isSame(thisIc, otherIc)) return true; - if (otherIc.getInstruction() instanceof IfNonNull) + if (otherIc.getInstruction() instanceof IfNonNull || otherIc.getInstruction() instanceof IfNull) { StackContext s1 = thisIc.getPops().get(0), s2 = thisIc.getPops().get(1); @@ -44,7 +44,7 @@ public class IfACmpNe extends If @Override public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other) { - if (other.getInstruction() instanceof IfACmpEq) + if (other.getInstruction() instanceof IfACmpEq || other.getInstruction() instanceof IfNull) { super.mapOtherBranch(mapping, ctx, other); } diff --git a/src/main/java/net/runelite/deob/execution/ParallellMappingExecutor.java b/src/main/java/net/runelite/deob/execution/ParallellMappingExecutor.java index a46bf27118..c352594728 100644 --- a/src/main/java/net/runelite/deob/execution/ParallellMappingExecutor.java +++ b/src/main/java/net/runelite/deob/execution/ParallellMappingExecutor.java @@ -38,8 +38,6 @@ public class ParallellMappingExecutor if (e.frames.isEmpty()) return false; - assert !e2.frames.isEmpty(); - Frame f1 = e.frames.get(0), f2 = f1.other; diff --git a/src/test/java/net/runelite/deob/deobfuscators/rename/MapStaticTest.java b/src/test/java/net/runelite/deob/deobfuscators/rename/MapStaticTest.java index 4db44cbb85..fc511d6207 100644 --- a/src/test/java/net/runelite/deob/deobfuscators/rename/MapStaticTest.java +++ b/src/test/java/net/runelite/deob/deobfuscators/rename/MapStaticTest.java @@ -85,16 +85,22 @@ public class MapStaticTest ClassGroup group1 = JarUtil.loadJar(new File(JAR1)); ClassGroup group2 = JarUtil.loadJar(new File(JAR2)); - Method m1 = group1.findClass("client").findMethod("vmethod3096"); - Method m2 = group2.findClass("client").findMethod("vmethod2975"); + Method m1 = group1.findClass("client").findMethod("vmethod3054"); + Method m2 = group2.findClass("client").findMethod("vmethod2973"); ParallelExecutorMapping mappings = MappingExecutorUtil.map(m1, m2); System.out.println("BEGIN OF MAPPING"); - for (Entry e : mappings.getMap().entrySet()) + for (Object o : mappings.getOrder()) { - System.out.println(e.getKey() + " <-> " + e.getValue()); + Object value = mappings.get(o); + System.out.println(o + " <-> " + value); } + System.out.println("END OF MAPPINGS " + mappings.getMap().size()); + + // I think because this is an array store + //Object other = mappings.get(group1.findClass("class136").findField("field2098")); + //Assert.assertNotNull(other); } private static boolean test;