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)
799799 } else if (MONO_TYPE_ISSTRUCT (t )) {
800800 if (!mini_wasm_is_scalar_vtype (t , etype ))
801801 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 ))) {
803803 return FALSE;
804804 } else {
805805 if (etype )
806806 * etype = t ;
807807 }
808808 }
809809
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 );
813813 }
814814
815+ g_assert (!etype || * etype );
816+
815817 return TRUE;
816818}
You can’t perform that action at this time.
0 commit comments