mono_method_get_index: return zero for constructed array methods as they don't exist...
[mono.git] / 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);