Skip to content

Commit

Permalink
Fix VMArray growth logic bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
jnthn committed Jul 20, 2013
1 parent abc88b3 commit 4c6b793
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/vm/parrot/6model/reprs/VMArray.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,14 @@ static void ensure_size(PARROT_INTERP, VMArrayBody *body, VMArrayREPRData *repr_
slots = (slots)
? mem_sys_realloc(slots, ssize*elem_size)
: mem_sys_allocate(ssize*elem_size);
body->ssize = ssize;
body->slots = slots;

/* Fill out any unused slots with PMCNULL pointers */
while (elems < ssize) {
null_pos(interp, body, repr_data, elems);
elems++;
}

body->ssize = ssize;
body->slots = slots;
}

static INTVAL get_pos_int(PARROT_INTERP, VMArrayBody *body, VMArrayREPRData *repr_data, INTVAL offset) {
Expand Down

0 comments on commit 4c6b793

Please sign in to comment.