diff options
author | jbevain <jbevain@gmail.com> | 2011-08-21 18:48:00 +0400 |
---|---|---|
committer | jbevain <jbevain@gmail.com> | 2011-08-21 18:48:00 +0400 |
commit | df4571476f79eb7aad8f10bf5441b7f4b74e279f (patch) | |
tree | c63c232e21737fd57fa0da40ae0c500e3bd3035c /Mono.Cecil | |
parent | 4b3b365a6ceb3a067ae6e2f3c3e7f16b4eb7f161 (diff) |
Fix generic MD array access
Diffstat (limited to 'Mono.Cecil')
-rw-r--r-- | Mono.Cecil/AssemblyReader.cs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Mono.Cecil/AssemblyReader.cs b/Mono.Cecil/AssemblyReader.cs index f412d74..2ea2c3c 100644 --- a/Mono.Cecil/AssemblyReader.cs +++ b/Mono.Cecil/AssemblyReader.cs @@ -2188,7 +2188,8 @@ namespace Mono.Cecil { { var declaring_type = GetTypeDefOrRef (type); - this.context = declaring_type; + if (!declaring_type.IsArray) + this.context = declaring_type; var member = ReadMemberReferenceSignature (signature, declaring_type); member.Name = name; @@ -2821,7 +2822,7 @@ namespace Mono.Cecil { method.CallingConvention = (MethodCallingConvention) calling_convention; var generic_context = method as MethodReference; - if (generic_context != null) + if (generic_context != null && !generic_context.DeclaringType.IsArray) reader.context = generic_context; if ((calling_convention & 0x10) != 0) { |