mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
ci->acc should not be left uninitialized; close #303
This commit is contained in:
@@ -711,6 +711,7 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
if (ci->argc == CALL_MAXARGS) ci->argc = -1;
|
||||
ci->target_class = m->target_class;
|
||||
ci->pc = pc + 1;
|
||||
ci->acc = a;
|
||||
|
||||
/* prepare stack */
|
||||
mrb->stack += a;
|
||||
@@ -725,9 +726,6 @@ mrb_run(mrb_state *mrb, struct RProc *proc, mrb_value self)
|
||||
NEXT;
|
||||
}
|
||||
else {
|
||||
/* fill callinfo */
|
||||
ci->acc = a;
|
||||
|
||||
/* setup environment for calling method */
|
||||
proc = mrb->ci->proc = m;
|
||||
irep = m->body.irep;
|
||||
|
||||
Reference in New Issue
Block a user