Skip to content

Commit

Permalink
Use Module.ScopeName and not Module.Name, closes 0xd4d#284
Browse files Browse the repository at this point in the history
  • Loading branch information
wtfsck committed Jul 14, 2019
1 parent a86fca3 commit 5a53964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DotNet/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ public IField Import(FieldInfo fieldInfo, bool forceFixSignature) {
var asm = module.Context.AssemblyResolver.Resolve(origDeclType.Module.Assembly.GetName(), module);
if (asm == null || asm.FullName != origDeclType.Assembly.FullName)
throw new Exception("Couldn't resolve the correct assembly");
var mod = asm.FindModule(origDeclType.Module.Name) as ModuleDefMD;
var mod = asm.FindModule(origDeclType.Module.ScopeName) as ModuleDefMD;
if (mod == null)
throw new Exception("Couldn't resolve the correct module");
var fieldDef = mod.ResolveField((uint)(origField.MetadataToken & 0x00FFFFFF));
Expand Down

0 comments on commit 5a53964

Please sign in to comment.