Skip to content

Commit 2682b1e

Browse files
authored
Merge pull request #999 from Unity-Technologies/unity-master-fix-get-offset-initialization
Fix issue where get offset could return 0 when the type is uninited
2 parents 4a859c4 + 81253f6 commit 2682b1e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mono/metadata/class.c

+1
Original file line numberDiff line numberDiff line change
@@ -9685,6 +9685,7 @@ mono_field_get_flags (MonoClassField *field)
96859685
guint32
96869686
mono_field_get_offset (MonoClassField *field)
96879687
{
9688+
mono_class_setup_fields(field->parent);
96889689
return field->offset;
96899690
}
96909691

0 commit comments

Comments
 (0)