We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3ec06a commit 7b8ee04Copy full SHA for 7b8ee04
Mono.Cecil.Cil/PortablePdb.cs
@@ -301,7 +301,11 @@ public ImageDebugHeader GetDebugHeader ()
301
// PDB Age
302
buffer.WriteUInt32 (1);
303
// PDB Path
304
- buffer.WriteBytes (System.Text.Encoding.UTF8.GetBytes (writer.BaseStream.GetFileName ()));
+ var fileName = writer.BaseStream.GetFileName ();
305
+ if (string.IsNullOrEmpty (fileName)) {
306
+ fileName = module.Assembly.Name.Name + ".pdb";
307
+ }
308
+ buffer.WriteBytes (System.Text.Encoding.UTF8.GetBytes (fileName));
309
buffer.WriteByte (0);
310
311
var data = new byte [buffer.length];
0 commit comments