2006-08-11 Jonathan Chambers <joncham@gmail.com>
authorJonathan Chambers <joncham@gmail.com>
Fri, 11 Aug 2006 20:31:21 +0000 (20:31 -0000)
committerJonathan Chambers <joncham@gmail.com>
Fri, 11 Aug 2006 20:31:21 +0000 (20:31 -0000)
* class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
type check on multi-dimensional arrays. Fixes #79000.

svn path=/trunk/mono/; revision=63656

mono/metadata/ChangeLog
mono/metadata/class.c

index 94c5be5b13a4c5ae39c8c7719866ae4db6d319d8..80bf2a81ae79d7b1b51c1133b87c78a20f892bb1 100644 (file)
@@ -1,3 +1,8 @@
+2006-08-11  Jonathan Chambers  <joncham@gmail.com>
+
+       * class.c (mono_bounded_array_class_get): Fix if statement that caused incorrect
+       type check on multi-dimensional arrays. Fixes #79000.
+
 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
 
        * class.c (mono_class_setup_parent): setup is_com_object during class initialization.
index d20ee6783548e3c6adfc2a7342ad96e3d47383e5..2ff91600a2075aba35f3f0e5cb46264b1e70a817 100644 (file)
@@ -3354,7 +3354,7 @@ mono_bounded_array_class_get (MonoClass *eclass, guint32 rank, gboolean bounded)
        if ((rootlist = list = g_hash_table_lookup (image->array_cache, eclass))) {
                for (; list; list = list->next) {
                        class = list->data;
-                       if ((class->rank == rank) && (class->byval_arg.type == (bounded ? MONO_TYPE_ARRAY : MONO_TYPE_SZARRAY))) {
+                       if ((class->rank == rank) && (class->byval_arg.type == (((rank > 1) || bounded) ? MONO_TYPE_ARRAY : MONO_TYPE_SZARRAY))) {
                                mono_loader_unlock ();
                                return class;
                        }