From 238b5ac0920977f155ce177fcb0963c4a07556ac Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 23 Jan 2019 00:22:36 +0100 Subject: [PATCH] Fix CombineExitsTransform --- ICSharpCode.Decompiler/IL/Transforms/CombineExitsTransform.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/IL/Transforms/CombineExitsTransform.cs b/ICSharpCode.Decompiler/IL/Transforms/CombineExitsTransform.cs index 217179b37..469fbdedf 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/CombineExitsTransform.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/CombineExitsTransform.cs @@ -13,11 +13,11 @@ namespace ICSharpCode.Decompiler.IL.Transforms var block = container.EntryPoint; if (block.Kind != BlockKind.ControlFlow) return; - if (!(block.Instructions.SecondToLastOrDefault() is IfInstruction ifInst && block.Instructions.LastOrDefault() is Leave leave)) + if (!(block.Instructions.SecondToLastOrDefault() is IfInstruction ifInst && block.Instructions.LastOrDefault() is Leave leave2)) return; if (!ifInst.FalseInst.MatchNop()) return; - if (!(Block.Unwrap(ifInst.TrueInst) is Leave leave2)) + if (!(Block.Unwrap(ifInst.TrueInst) is Leave leave)) return; if (!(leave.IsLeavingFunction && leave2.IsLeavingFunction)) return;