diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-01-05 19:18:13 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2014-01-05 19:18:13 +0900 |
| commit | f5cca078e3193f1fff57545defa36d1f8ee8862f (patch) | |
| tree | 685f3acc784a435859d115c79731eb7ecedf2fc8 /src | |
| parent | 0e23038a60d8656d8d92291efdeb418f9b166c09 (diff) | |
| download | mruby-f5cca078e3193f1fff57545defa36d1f8ee8862f.tar.gz mruby-f5cca078e3193f1fff57545defa36d1f8ee8862f.zip | |
avoid decrimenting eidx out of ecall()
Diffstat (limited to 'src')
| -rw-r--r-- | src/vm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -855,12 +855,12 @@ mrb_context_run(mrb_state *mrb, struct RProc *proc, mrb_value self, unsigned int CASE(OP_EPOP) { /* A A.times{ensure_pop().call} */ - int n; int a = GETARG_A(i); mrb_callinfo *ci = mrb->c->ci; + int n, eidx = ci->eidx; - for (n=0; n<a && ci->eidx > ci[-1].eidx; n++) { - ecall(mrb, --ci->eidx); + for (n=0; n<a && eidx > ci[-1].eidx; n++) { + ecall(mrb, --eidx); ARENA_RESTORE(mrb, ai); } NEXT; |
