Author: massi
Date: 2007-01-17 16:35:11 -0500 (Wed, 17 Jan 2007)
New Revision: 71231

Modified:
   trunk/mono/mono/metadata/ChangeLog
   trunk/mono/mono/metadata/class.c
Log:
        * class.c: Fix bug 80307.



Modified: trunk/mono/mono/metadata/ChangeLog
===================================================================
--- trunk/mono/mono/metadata/ChangeLog  2007-01-17 21:33:36 UTC (rev 71230)
+++ trunk/mono/mono/metadata/ChangeLog  2007-01-17 21:35:11 UTC (rev 71231)
@@ -1,3 +1,5 @@
+2007-01-17  Massimiliano Mantione  <[EMAIL PROTECTED]>
+       * class.c: Fix bug 80307.
 
 Wed Jan 17 17:09:20 CET 2007 Paolo Molaro <[EMAIL PROTECTED]>
 

Modified: trunk/mono/mono/metadata/class.c
===================================================================
--- trunk/mono/mono/metadata/class.c    2007-01-17 21:33:36 UTC (rev 71230)
+++ trunk/mono/mono/metadata/class.c    2007-01-17 21:35:11 UTC (rev 71231)
@@ -404,12 +404,12 @@
  * @type: a type
  *
  * Returns: the MonoType for the underlying interger type if @type
- * is an enum, otherwise the type itself.
+ * is an enum and byref is false, otherwise the type itself.
  */
 MonoType*
 mono_type_get_underlying_type (MonoType *type)
 {
-       if (type->type == MONO_TYPE_VALUETYPE && type->data.klass->enumtype)
+       if (type->type == MONO_TYPE_VALUETYPE && type->data.klass->enumtype && 
!type->byref)
                return type->data.klass->enum_basetype;
        return type;
 }

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

Reply via email to