From 6b89c9722f264d0b3e7b83a4ef4f7a481afa4308 Mon Sep 17 00:00:00 2001 From: Daniel Grunwald Date: Sat, 30 May 2015 20:55:41 +0200 Subject: [PATCH] Fix TryFault flags computation --- ICSharpCode.Decompiler/IL/Instructions/TryInstruction.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ICSharpCode.Decompiler/IL/Instructions/TryInstruction.cs b/ICSharpCode.Decompiler/IL/Instructions/TryInstruction.cs index 53e38b19d..00bef9fb0 100644 --- a/ICSharpCode.Decompiler/IL/Instructions/TryInstruction.cs +++ b/ICSharpCode.Decompiler/IL/Instructions/TryInstruction.cs @@ -331,8 +331,9 @@ namespace ICSharpCode.Decompiler.IL protected override InstructionFlags ComputeFlags() { - // The endpoint of the try-fault is unreachable only if both endpoints are unreachable - return IfInstruction.CombineFlags(Block.Phase1Boundary(TryBlock.Flags), Block.Phase1Boundary(faultBlock.Flags)); + // The endpoint of the try-fault is unreachable iff the try endpoint is unreachable + return Block.Phase1Boundary(TryBlock.Flags) + | Block.Phase1Boundary(faultBlock.Flags & ~InstructionFlags.EndPointUnreachable); } protected override int GetChildCount()