Browse Source

[switch] Sort switch sections

pull/887/head
Daniel Grunwald 8 years ago
parent
commit
c7490ff2fe
  1. 1
      ICSharpCode.Decompiler/IL/ControlFlow/SwitchDetection.cs

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

@ -115,6 +115,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow @@ -115,6 +115,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow
return false;
});
AdjustLabels(sw);
sw.Sections.ReplaceList(sw.Sections.OrderBy(s => (s.Body as Branch)?.TargetILOffset).ThenBy(s => s.Labels.Values.FirstOrDefault()));
}
static void AdjustLabels(SwitchInstruction sw)

Loading…
Cancel
Save