vm.c (stack_init): clear initial stack

This commit is contained in:
Yukihiro "Matz" Matsumoto
2025-05-22 16:29:57 +09:00
parent 86ef7a912d
commit ca526044d3
+1
View File
@@ -118,6 +118,7 @@ stack_init(mrb_state *mrb)
/* mrb_assert(mrb->stack == NULL); */
c->stbase = (mrb_value*)mrb_malloc(mrb, STACK_INIT_SIZE * sizeof(mrb_value));
c->stend = c->stbase + STACK_INIT_SIZE;
stack_clear(c->stbase, STACK_INIT_SIZE);
/* mrb_assert(ci == NULL); */
static const mrb_callinfo ci_zero = { 0 };