Author: zoltan
Date: 2006-05-20 07:37:43 -0400 (Sat, 20 May 2006)
New Revision: 60887
Modified:
trunk/mono/mono/metadata/ChangeLog
trunk/mono/mono/metadata/reflection.c
Log:
2006-05-20 Zoltan Varga <[EMAIL PROTECTED]>
* reflection.c (encode_cattr_value): Fix yet another bug in the
encoding of
MONO_TYPE_OBJECT. Fixes #78462.
Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog 2006-05-20 08:38:27 UTC (rev 60886)
+++ trunk/mono/mono/metadata/ChangeLog 2006-05-20 11:37:43 UTC (rev 60887)
@@ -1,3 +1,8 @@
+2006-05-20 Zoltan Varga <[EMAIL PROTECTED]>
+
+ * reflection.c (encode_cattr_value): Fix yet another bug in the
encoding of
+ MONO_TYPE_OBJECT. Fixes #78462.
+
2006-05-18 Zoltan Varga <[EMAIL PROTECTED]>
* marshal.c (emit_marshal_vtype): Add support for
UnmanagedType.LPStruct
Modified: trunk/mono/mono/metadata/reflection.c
===================================================================
--- trunk/mono/mono/metadata/reflection.c 2006-05-20 08:38:27 UTC (rev
60886)
+++ trunk/mono/mono/metadata/reflection.c 2006-05-20 11:37:43 UTC (rev
60887)
@@ -7804,8 +7804,12 @@
*retbuffer = buffer;
eclass = type->data.klass;
arg_eclass = mono_object_class (arg)->element_class;
+
+ if (!eclass) {
+ /* Happens when we are called from the MONO_TYPE_OBJECT
case below */
+ eclass = mono_defaults.object_class;
+ }
if (eclass == mono_defaults.object_class &&
arg_eclass->valuetype) {
- /* Happens when we are called from the MONO_TYPE_OBJECT
case below */
char *elptr = mono_array_addr ((MonoArray*)arg, char,
0);
int elsize = mono_class_array_element_size (arg_eclass);
for (i = 0; i < len; ++i) {
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches