2008-01-10 Zoltan Varga <vargaz@gmail.com>
authorZoltan Varga <vargaz@gmail.com>
Wed, 9 Jan 2008 22:38:22 +0000 (22:38 -0000)
committerZoltan Varga <vargaz@gmail.com>
Wed, 9 Jan 2008 22:38:22 +0000 (22:38 -0000)
* marshal.c (mono_class_native_size): Always set *align even if this is called
recursively.

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

mono/metadata/ChangeLog
mono/metadata/marshal.c

index db8c51a71359e0c20d8cc9daba1d2a7fa194a1e7..6e42e5f0a6aa896a4d90d186bf9629543033b1bb 100644 (file)
@@ -1,3 +1,8 @@
+2008-01-10  Zoltan Varga  <vargaz@gmail.com>
+
+       * marshal.c (mono_class_native_size): Always set *align even if this is called
+       recursively.
+
 2008-01-09  Zoltan Varga  <vargaz@gmail.com>
 
        * verify.c (mono_verify_corlib): Remove this as it was not used and was 
index c43f8dde27262afea805030009f32ad4bc699877..f398b94660b876ef1a814c1af573be6270c8ffe9 100644 (file)
@@ -10635,7 +10635,7 @@ mono_marshal_load_type_info (MonoClass* klass)
                native_size += parent_size;
                info->native_size = parent_size;
        }
-       
+
        iter = NULL;
        j = 0;
        while ((field = mono_class_get_fields (klass, &iter))) {
@@ -10723,10 +10723,13 @@ gint32
 mono_class_native_size (MonoClass *klass, guint32 *align)
 {      
        if (!klass->marshal_info) {
-               if (mono_marshal_is_loading_type_info (klass))
+               if (mono_marshal_is_loading_type_info (klass)) {
+                       if (align)
+                               *align = 0;
                        return 0;
-               else
+               } else {
                        mono_marshal_load_type_info (klass);
+               }
        }
 
        if (align)