diff --git a/ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs b/ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs index ab264e3da..cb50ec78f 100644 --- a/ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs +++ b/ICSharpCode.Decompiler/IL/ControlFlow/SwitchAnalysis.cs @@ -116,6 +116,8 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow if (!(tailOnly || block.Instructions.Count == 2)) return false; trueValues = trueValues.IntersectWith(inputValues); + if (trueValues.SetEquals(inputValues) || trueValues.IsEmpty) + return false; Block trueBlock; if (trueInst.MatchBranch(out trueBlock) && AnalyzeBlock(trueBlock, trueValues)) { // OK, true block was further analyzed.