summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/regex.c b/regex.c
index e40c0e4..7f65e4e 100644
--- a/regex.c
+++ b/regex.c
@@ -3496,6 +3496,7 @@ init_regs(regs, num_regs)
else if (regs->allocated < num_regs) {
TREALLOC(regs->beg, num_regs, int);
TREALLOC(regs->end, num_regs, int);
+ regs->allocated = num_regs;
}
for (i=0; i<num_regs; i++) {
regs->beg[i] = regs->end[i] = -1;