Browse Source

Fix #1480: InvalidOperationException in PortablePdbWriter.

pull/1505/head
Siegfried Pammer 6 years ago
parent
commit
46ba4fc66a
  1. 6
      ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs

6
ICSharpCode.Decompiler/DebugInfo/PortablePdbWriter.cs

@ -135,15 +135,15 @@ namespace ICSharpCode.Decompiler.DebugInfo
} }
} }
stateMachineMethods.SortBy(row => row.MoveNextMethod); stateMachineMethods.SortBy(row => MetadataTokens.GetRowNumber(row.MoveNextMethod));
foreach (var row in stateMachineMethods) { foreach (var row in stateMachineMethods) {
metadata.AddStateMachineMethod(row.MoveNextMethod, row.KickoffMethod); metadata.AddStateMachineMethod(row.MoveNextMethod, row.KickoffMethod);
} }
customMethodDebugInfo.SortBy(row => row.Parent); customMethodDebugInfo.SortBy(row => MetadataTokens.GetRowNumber(row.Parent));
foreach (var row in customMethodDebugInfo) { foreach (var row in customMethodDebugInfo) {
metadata.AddCustomDebugInformation(row.Parent, row.Guid, row.Blob); metadata.AddCustomDebugInformation(row.Parent, row.Guid, row.Blob);
} }
customDocumentDebugInfo.SortBy(row => row.Parent); customDocumentDebugInfo.SortBy(row => MetadataTokens.GetRowNumber(row.Parent));
foreach (var row in customDocumentDebugInfo) { foreach (var row in customDocumentDebugInfo) {
metadata.AddCustomDebugInformation(row.Parent, row.Guid, row.Blob); metadata.AddCustomDebugInformation(row.Parent, row.Guid, row.Blob);
} }

Loading…
Cancel
Save