diff options
Diffstat (limited to 're.c')
| -rw-r--r-- | re.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1023,7 +1023,7 @@ update_char_offset(VALUE match) num_regs = rm->regs.num_regs; if (rm->char_offset_num_allocated < num_regs) { - REALLOC_N(rm->char_offset, struct rmatch_offset, num_regs); + SIZED_REALLOC_N(rm->char_offset, struct rmatch_offset, num_regs, rm->char_offset_num_allocated); rm->char_offset_num_allocated = num_regs; } @@ -1101,7 +1101,7 @@ match_init_copy(VALUE obj, VALUE orig) if (RMATCH_EXT(orig)->char_offset_num_allocated) { if (rm->char_offset_num_allocated < rm->regs.num_regs) { - REALLOC_N(rm->char_offset, struct rmatch_offset, rm->regs.num_regs); + SIZED_REALLOC_N(rm->char_offset, struct rmatch_offset, rm->regs.num_regs, rm->char_offset_num_allocated); rm->char_offset_num_allocated = rm->regs.num_regs; } MEMCPY(rm->char_offset, RMATCH_EXT(orig)->char_offset, |
