Browse Source

Fix #1338: KeyNotFoundException in SwitchDetection.AnalyzeControlFlow()

pull/1347/head v4.0-beta3
Daniel Grunwald 7 years ago
parent
commit
b5ab8a4622
  1. 2
      ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs

2
ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs

@ -350,10 +350,12 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow @@ -350,10 +350,12 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow
if (!s.Value.MatchBranch(out var block))
continue;
if (block.Parent == currentContainer) {
var node = controlFlowGraph.GetNode(block);
if (!loopContext.MatchContinue(node))
caseNodes.Add(node);
}
}
AddNullCase(flowNodes, caseNodes);

Loading…
Cancel
Save