From dd0a96436e6a3ce5848494ff110a18834f8a2628 Mon Sep 17 00:00:00 2001 From: Adam Date: Fri, 5 Feb 2016 16:00:51 -0500 Subject: [PATCH] ifnonnull vs ifnull --- .../code/instructions/IfNonNull.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/net/runelite/deob/attributes/code/instructions/IfNonNull.java b/src/main/java/net/runelite/deob/attributes/code/instructions/IfNonNull.java index bc30320a8b..0b0b807086 100644 --- a/src/main/java/net/runelite/deob/attributes/code/instructions/IfNonNull.java +++ b/src/main/java/net/runelite/deob/attributes/code/instructions/IfNonNull.java @@ -2,6 +2,7 @@ package net.runelite.deob.attributes.code.instructions; import net.runelite.deob.attributes.code.InstructionType; import net.runelite.deob.attributes.code.Instructions; +import net.runelite.deob.deobfuscators.rename.ParallelExecutorMapping; import net.runelite.deob.execution.InstructionContext; import net.runelite.deob.execution.StackContext; @@ -32,7 +33,24 @@ public class IfNonNull extends If0 return true; } } + else if (otherIc.getInstruction() instanceof IfNull) + { + return true; + } return false; } + + @Override + public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other) + { + if (other.getInstruction() instanceof IfNull) + { + super.mapOtherBranch(mapping, ctx, other); + } + else + { + super.map(mapping, ctx, other); + } + } }