Skip to content
This repository has been archived by the owner on Dec 18, 2021. It is now read-only.

Commit

Permalink
Handle types without a name (invalid, but created by some obfuscator).
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrijters committed Feb 21, 2017
1 parent 53bbbae commit 879f946
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Managed.Reflection/Reader/TypeDefImpl.cs
Expand Up @@ -39,7 +39,8 @@ internal TypeDefImpl(ModuleReader module, int index)
{
this.module = module;
this.index = index;
this.typeName = module.GetString(module.TypeDef.records[index].TypeName);
// empty typeName is not allowed, but obfuscators...
this.typeName = module.GetString(module.TypeDef.records[index].TypeName) ?? "";
this.typeNamespace = module.GetString(module.TypeDef.records[index].TypeNamespace);
MarkKnownType(typeNamespace, typeName);
}
Expand Down

0 comments on commit 879f946

Please sign in to comment.