Author: miguel
Date: 2007-03-17 13:17:42 -0500 (Sat, 17 Mar 2007)
New Revision: 74537

Modified:
   tags/mono-1-2-3-50/mono/mono/metadata/icall.c
Log:
Backport this one

Modified: tags/mono-1-2-3-50/mono/mono/metadata/icall.c
===================================================================
--- tags/mono-1-2-3-50/mono/mono/metadata/icall.c       2007-03-17 18:13:53 UTC 
(rev 74536)
+++ tags/mono-1-2-3-50/mono/mono/metadata/icall.c       2007-03-17 18:17:42 UTC 
(rev 74537)
@@ -1786,10 +1786,12 @@
 
        MONO_ARCH_SAVE_REGS;
 
-       // GetElementType should only return a type for:
+       // GelElementType should only return a type for:
        // Array Pointer PassedByRef
        if (type->type->byref)
                return mono_type_get_object (mono_object_domain (type), 
&class->byval_arg);
+       if (class->enumtype && class->enum_basetype) /* types that are 
modifierd typebuilkders may not have enum_basetype set */
+               return mono_type_get_object (mono_object_domain (type), 
class->enum_basetype);
        else if (class->element_class && MONO_CLASS_IS_ARRAY (class))
                return mono_type_get_object (mono_object_domain (type), 
&class->element_class->byval_arg);
        else if (class->element_class && type->type->type == MONO_TYPE_PTR)

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to