prevent out-of-bounds ensure clause access; fix #2910

This commit is contained in:
Yukihiro "Matz" Matsumoto
2015-08-10 11:41:01 +09:00
parent 0c7d29dff6
commit 5af770cd59
+1
View File
@@ -266,6 +266,7 @@ ecall(mrb_state *mrb, int i)
mrb_value *self = mrb->c->stack;
struct RObject *exc;
if (i<0) return;
p = mrb->c->ensure[i];
if (!p) return;
if (mrb->c->ci->eidx > i)