vm.c: need to ensure the stack size is sufficient.

Need to add `n` because the stack will be shifted in the `mrb_funcall`.
parent 6b3b1012
...@@ -478,7 +478,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc ...@@ -478,7 +478,7 @@ mrb_funcall_with_block(mrb_state *mrb, mrb_value self, mrb_sym mid, mrb_int argc
} }
c = mrb_class(mrb, self); c = mrb_class(mrb, self);
m = mrb_method_search_vm(mrb, &c, mid); m = mrb_method_search_vm(mrb, &c, mid);
mrb_stack_extend(mrb, argc + 3); mrb_stack_extend(mrb, n + argc + 3);
if (MRB_METHOD_UNDEF_P(m) || argc >= 15) { if (MRB_METHOD_UNDEF_P(m) || argc >= 15) {
mrb_value args = mrb_ary_new_from_values(mrb, argc, argv); mrb_value args = mrb_ary_new_from_values(mrb, argc, argv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment