diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-10-14 22:47:19 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-10-14 22:47:19 +0900 |
| commit | 7010ed0f0a414b1367e4620a504f106759341cc2 (patch) | |
| tree | 7e2a7a6c7a63b182cffa8d4604a6c2d5e90428b5 /src/vm.c | |
| parent | 6b3b1012ca480f1e930c4ddeeaebed55e5df4144 (diff) | |
| download | mruby-7010ed0f0a414b1367e4620a504f106759341cc2.tar.gz mruby-7010ed0f0a414b1367e4620a504f106759341cc2.zip | |
vm.c: need to ensure the stack size is sufficient.
Need to add `n` because the stack will be shifted in the `mrb_funcall`.
Diffstat (limited to 'src/vm.c')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); 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) { mrb_value args = mrb_ary_new_from_values(mrb, argc, argv); |
