Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2017-02-22 13:18:03 +0300
committerMarek Safar <marek.safar@gmail.com>2017-02-22 13:18:03 +0300
commit7c1e61bec8c069b2cc9e214c3094b147d76bbf82 (patch)
treea24c2961c19aa323fa08e16b31f6b7ee47c29ea6
parent367864ef810859ae3ce652864233b35f2dd5fdbe (diff)
Handle types without a name (invalid, but created by some obfuscator).
-rw-r--r--reflect/Reader/TypeDefImpl.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/reflect/Reader/TypeDefImpl.cs b/reflect/Reader/TypeDefImpl.cs
index 4dc8030c..61880851 100644
--- a/reflect/Reader/TypeDefImpl.cs
+++ b/reflect/Reader/TypeDefImpl.cs
@@ -41,7 +41,8 @@ namespace IKVM.Reflection.Reader
{
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);
}