child_frame.runtime_method = get_virtual_method (context->domain, child_frame.runtime_method, this_arg);
if (this_arg->vtable->klass->valuetype && child_frame.runtime_method->valuetype) {
- sp->data.p = (char *) this_arg + sizeof (MonoObject);
+ /* unbox */
+ gpointer *unboxed = mono_object_unbox (this_arg);
+ stackval_from_data (&this_arg->vtable->klass->byval_arg, sp, (char *) unboxed, FALSE);
}
ves_exec_method_with_context (&child_frame, context);
child_frame.runtime_method = get_virtual_method (context->domain, child_frame.runtime_method, this_arg);
if (this_arg->vtable->klass->valuetype && child_frame.runtime_method->valuetype) {
- sp->data.p = (char *) this_arg + sizeof (MonoObject);
+ gpointer *unboxed = mono_object_unbox (this_arg);
+ stackval_from_data (&this_arg->vtable->klass->byval_arg, sp, (char *) unboxed, FALSE);
}
ves_exec_method_with_context (&child_frame, context);