Skip to content

Commit

Permalink
Escape invalid characters in assembly and module names
Browse files Browse the repository at this point in the history
  • Loading branch information
ElektroKill committed Oct 11, 2023
1 parent 8280430 commit 1915d88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dnSpy/dnSpy.Decompiler/DecompilerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ protected void WriteModule(ModuleDef mod, IDecompilerOutput output, Decompilatio
void DecompileInternal(AssemblyDef asm, IDecompilerOutput output, DecompilationContext ctx) {
this.WriteCommentLine(output, asm.ManifestModule.Location);
if (asm.IsContentTypeWindowsRuntime)
this.WriteCommentLine(output, asm.Name + " [WinRT]");
this.WriteCommentLine(output, IdentifierEscaper.Escape(asm.Name, true) + " [WinRT]");
else
this.WriteCommentLine(output, asm.FullName);
this.WriteCommentLine(output, IdentifierEscaper.Escape(asm.FullName, true));
}

void DecompileInternal(ModuleDef mod, IDecompilerOutput output, DecompilationContext ctx) {
this.WriteCommentLine(output, mod.Location);
this.WriteCommentLine(output, mod.Name);
this.WriteCommentLine(output, IdentifierEscaper.Escape(mod.Name, true));
}

protected void PrintEntryPoint(ModuleDef mod, IDecompilerOutput output) {
Expand Down

0 comments on commit 1915d88

Please sign in to comment.