Skip to content

Commit

Permalink
Check HasDebugHeader
Browse files Browse the repository at this point in the history
  • Loading branch information
sbomer committed Jun 5, 2024
1 parent 0f75387 commit 4180d2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Mono.Cecil.Cil/PortablePdb.cs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ public void Write ()

string GetPdbPath ()
{
var debugHeader = module.Image.DebugHeader;
if (!module.HasDebugHeader)
return string.Empty;

var debugHeader = module.GetDebugHeader ();
foreach (var entry in debugHeader.Entries) {
var data = entry.Data;
// Pdb path is NUL-terminated path at offset 24.
Expand Down

0 comments on commit 4180d2c

Please sign in to comment.