aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regcomp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/regex/regcomp.c')
-rw-r--r--src/backend/regex/regcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/regex/regcomp.c b/src/backend/regex/regcomp.c
index f0896d2db14..cd0caaa2d03 100644
--- a/src/backend/regex/regcomp.c
+++ b/src/backend/regex/regcomp.c
@@ -942,7 +942,6 @@ parseqatom(struct vars *v,
subno = v->nsubexp;
if ((size_t) subno >= v->nsubs)
moresubs(v, subno);
- assert((size_t) subno < v->nsubs);
}
else
atomtype = PLAIN; /* something that's not '(' */
@@ -960,6 +959,7 @@ parseqatom(struct vars *v,
NOERR();
if (cap)
{
+ assert(v->subs[subno] == NULL);
v->subs[subno] = atom;
t = subre(v, '(', atom->flags | CAP, lp, rp);
NOERR();