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 @@ -798,18 +798,20 @@ mini_wasm_is_scalar_vtype (MonoType *type, MonoType **etype)
798798		} else  if  (MONO_TYPE_ISSTRUCT  (t )) {
799799			if  (!mini_wasm_is_scalar_vtype  (t , etype ))
800800				return  FALSE;
801- 		} else  if  (!(( MONO_TYPE_IS_PRIMITIVE  (t ) ||  MONO_TYPE_IS_REFERENCE  (t ) ||  MONO_TYPE_IS_POINTER  (t ) ))) {
801+ 		} else  if  (!(MONO_TYPE_IS_PRIMITIVE  (t ) ||  MONO_TYPE_IS_REFERENCE  (t ) ||  MONO_TYPE_IS_POINTER  (t ))) {
802802			return  FALSE;
803803		} else  {
804804			if  (etype )
805805				* etype  =  t ;
806806		}
807807	}
808808
809- 	if  ( etype ) { 
810- 		 if  (!( * etype )) 
811- 			 * etype  =  mono_get_int32_type  ( );
809+ 	// empty struct 
810+ 	if  (nfields   ==   0   &&   etype ) { 
811+ 		* etype  =  m_class_get_byval_arg  ( mono_defaults . sbyte_class );
812812	}
813813
814+ 	g_assert  (!etype  ||  * etype );
815+ 
814816	return  TRUE;
815817}
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments