Commit 414a61a9 authored by dearblue's avatar dearblue

Fixed stack position of return value; ref #5272

When I `#call` the "proc" object created by the `mrb_proc_new_cfunc()` function from Ruby space, the return value did not go into the correct stack position.
This can destroy the calling variable.

This issue is now caused by #5272. sorry.
parent 4bba769b
......@@ -1515,7 +1515,7 @@ RETRY_TRY_BLOCK:
/* pop stackpos */
ci = cipop(mrb);
pc = ci->pc;
regs[ci->acc] = recv;
regs[ci[1].acc] = recv;
irep = mrb->c->ci->proc->body.irep;
pool = irep->pool;
syms = irep->syms;
......
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