mono_method_get_index: return zero for constructed array methods as they don't exist...
authorJb Evain <jbevain@gmail.com>
Wed, 4 Aug 2010 13:43:10 +0000 (15:43 +0200)
committerJb Evain <jbevain@gmail.com>
Wed, 4 Aug 2010 13:46:18 +0000 (15:46 +0200)
mono/metadata/loader.c

index a7b22e865affd8dbdf2ff66fc498ea09b15a77ea..3cb614089d5459dd3dc5e6d3a2f66e07046f6627 100644 (file)
@@ -2381,6 +2381,10 @@ mono_method_get_index (MonoMethod *method) {
        MonoClass *klass = method->klass;
        int i;
 
+       if (klass->rank)
+               /* constructed array methods are not in the MethodDef table */
+               return 0;
+
        if (method->token)
                return mono_metadata_token_index (method->token);