File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -799,18 +799,20 @@ mini_wasm_is_scalar_vtype (MonoType *type, MonoType **etype)
799
799
} else if (MONO_TYPE_ISSTRUCT (t )) {
800
800
if (!mini_wasm_is_scalar_vtype (t , etype ))
801
801
return FALSE;
802
- } else if (!(( MONO_TYPE_IS_PRIMITIVE (t ) || MONO_TYPE_IS_REFERENCE (t ) || MONO_TYPE_IS_POINTER (t ) ))) {
802
+ } else if (!(MONO_TYPE_IS_PRIMITIVE (t ) || MONO_TYPE_IS_REFERENCE (t ) || MONO_TYPE_IS_POINTER (t ))) {
803
803
return FALSE;
804
804
} else {
805
805
if (etype )
806
806
* etype = t ;
807
807
}
808
808
}
809
809
810
- if ( etype ) {
811
- if (!( * etype ))
812
- * etype = mono_get_int32_type ( );
810
+ // empty struct
811
+ if (nfields == 0 && etype ) {
812
+ * etype = m_class_get_byval_arg ( mono_defaults . sbyte_class );
813
813
}
814
814
815
+ g_assert (!etype || * etype );
816
+
815
817
return TRUE;
816
818
}
You can’t perform that action at this time.
0 commit comments