Permalink
Browse files

Fixed off-by-one error in `fiber_switch()`; ref #3641

  • Loading branch information...
matz committed May 25, 2017
1 parent f75f506 commit 7e4731655fecd953d3a5f8830267be6e79ab3b00
Showing with 1 addition and 1 deletion.
  1. +1 −1 mrbgems/mruby-fiber/src/fiber.c
@@ -190,7 +190,7 @@ fiber_switch(mrb_state *mrb, mrb_value self, mrb_int len, const mrb_value *a, mr
if (c->status == MRB_FIBER_CREATED) {
mrb_value *b, *e;
if (len > c->stend - c->stack) {
if (len >= c->stend - c->stack) {
mrb_raise(mrb, E_FIBER_ERROR, "too many arguments to fiber");
}
b = c->stack+1;

0 comments on commit 7e47316

Please sign in to comment.