Author: zoltan
Date: 2005-12-13 16:59:59 -0500 (Tue, 13 Dec 2005)
New Revision: 54325
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/object.c
Log:
2005-12-13 Zoltan Varga <[EMAIL PROTECTED]>
* object.c (mono_array_new_full): Treat a single dimensional array
with 0 lower bounds as an szarray. Fixes #76973.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2005-12-13 21:39:19 UTC (rev 54324)
+++ trunk/mono/mono/metadata/ChangeLog 2005-12-13 21:59:59 UTC (rev 54325)
@@ -1,5 +1,8 @@
2005-12-13 Zoltan Varga <[EMAIL PROTECTED]>
+ * object.c (mono_array_new_full): Treat a single dimensional array
+ with 0 lower bounds as an szarray. Fixes #76973.
+
* reflection.c (custom_attr_visible): Really fix this.
2005-12-12 Zoltan Varga <[EMAIL PROTECTED]>
Modified: trunk/mono/mono/metadata/object.c
===================================================================
--- trunk/mono/mono/metadata/object.c 2005-12-13 21:39:19 UTC (rev 54324)
+++ trunk/mono/mono/metadata/object.c 2005-12-13 21:59:59 UTC (rev 54325)
@@ -2549,7 +2549,8 @@
byte_len = mono_array_element_size (array_class);
len = 1;
- if (array_class->rank == 1 && array_class->byval_arg.type ==
MONO_TYPE_SZARRAY) {
+ /* A single dimensional array with a 0 lower bound is the same as an
szarray */
+ if (array_class->rank == 1 && ((array_class->byval_arg.type ==
MONO_TYPE_SZARRAY) || (lower_bounds && lower_bounds [0] == 0))) {
len = lengths [0];
if ((int) len < 0)
arith_overflow ();
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches