Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

idx should be less than the cap, if it is equal irep needs to grow.

  • Loading branch information...
commit 1685d241c4cbdcc29ca82c0c1222652b5d8395ec 1 parent 103ef78
@carsonmcdonald carsonmcdonald authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/state.c
View
4 src/state.c
@@ -78,8 +78,8 @@ mrb_add_irep(mrb_state *mrb, int idx)
mrb->irep = mrb_malloc(mrb, sizeof(mrb_irep*)*max);
mrb->irep_capa = max;
}
- else if (mrb->irep_capa < idx) {
- while (mrb->irep_capa < idx) {
+ else if (mrb->irep_capa <= idx) {
+ while (mrb->irep_capa <= idx) {
mrb->irep_capa *= 2;
}
mrb->irep = mrb_realloc(mrb, mrb->irep, sizeof(mrb_irep)*mrb->irep_capa);
Please sign in to comment.
Something went wrong with that request. Please try again.