diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-04 01:47:47 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-04-04 01:47:47 +0900 |
| commit | 2d616987994b4cde8f8cd70649c88660abdf4a89 (patch) | |
| tree | 51b03db831767280503483dc29edd7d615a1a9a7 | |
| parent | fc2b37f0ee87d64ff1253aaa9774558423b9651a (diff) | |
| download | mruby-2d616987994b4cde8f8cd70649c88660abdf4a89.tar.gz mruby-2d616987994b4cde8f8cd70649c88660abdf4a89.zip | |
should not access proc->body.irep if proc is PROC_CFUNC; close #1999
| -rw-r--r-- | src/vm.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -460,7 +460,6 @@ mrb_f_send(mrb_state *mrb, mrb_value self) ci->mid = name; ci->target_class = c; ci->proc = p; - ci->nregs = p->body.irep->nregs; regs = mrb->c->stack+1; /* remove first symbol from arguments */ if (ci->argc >= 0) { @@ -477,8 +476,8 @@ mrb_f_send(mrb_state *mrb, mrb_value self) return p->body.func(mrb, self); } - cipush(mrb); - ci = mrb->c->ci; + ci->nregs = p->body.irep->nregs; + ci = cipush(mrb); ci->target_class = 0; ci->pc = p->body.irep->iseq; ci->stackent = mrb->c->stack; |
