Skip to content

Commit 929620b

Browse files
jonchamMichael DeRoy
authored andcommitted
Allow structure to pointer conversion for blittable multi-dimensional arrays (case 940012)
1 parent cfa536f commit 929620b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mono/metadata/marshal.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1825,6 +1825,10 @@ emit_object_to_ptr_conv (MonoMethodBuilder *mb, MonoType *type, MonoMarshalConv
18251825

18261826
if (type->type == MONO_TYPE_SZARRAY) {
18271827
eklass = type->data.klass;
1828+
} else if (type->type == MONO_TYPE_ARRAY) {
1829+
eklass = type->data.array->eklass;
1830+
if (!eklass->blittable)
1831+
g_assert_not_reached ();
18281832
} else {
18291833
g_assert_not_reached ();
18301834
}

0 commit comments

Comments
 (0)