Skip to content

Commit cc6dfc6

Browse files
ds5678SamboyCoding
authored andcommitted
Fix missing dll extension for injected assemblies
1 parent ec613ab commit cc6dfc6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Cpp2IL.Core/Model/Contexts/AssemblyAnalysisContext.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,11 @@ public string ModuleName
7878
{
7979
get
8080
{
81-
var moduleName = Definition?.Image.Name ?? Name;
81+
var moduleName = Definition?.Image.Name;
8282
if (moduleName == "__Generated")
8383
moduleName += ".dll"; //__Generated doesn't have a .dll extension in the metadata but it is still of course a DLL
84+
else
85+
moduleName ??= Name + ".dll"; //If we don't have a module name, use the assembly name + .dll
8486
return moduleName;
8587
}
8688
}

0 commit comments

Comments
 (0)