diff options
| author | dearblue <[email protected]> | 2021-01-16 10:57:10 +0900 |
|---|---|---|
| committer | dearblue <[email protected]> | 2021-01-16 11:05:15 +0900 |
| commit | 414a61a9d210dcf797a3a48a3b50c94b60eea780 (patch) | |
| tree | f785a2fc032e8063aafdc3d6a6073081814d0d71 /src | |
| parent | 4bba769b951faa370ce210d28bf8cb46734304e6 (diff) | |
| download | mruby-414a61a9d210dcf797a3a48a3b50c94b60eea780.tar.gz mruby-414a61a9d210dcf797a3a48a3b50c94b60eea780.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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; |
