diff options
author | Kyle Evans <kevans@FreeBSD.org> | 2017-07-07 22:00:39 +0000 |
---|---|---|
committer | Kyle Evans <kevans@FreeBSD.org> | 2017-07-07 22:00:39 +0000 |
commit | 79c9a695c3ca1a2c673ba717b8763657a43f9151 (patch) | |
tree | 8f4dc11e5b6f367f17f1d00d4f4b2b248b053a64 /lib/libc/regex | |
parent | bbbfb2a922a832b4c22dc088885119a518e3dd2e (diff) |
Notes
Diffstat (limited to 'lib/libc/regex')
-rw-r--r-- | lib/libc/regex/regcomp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/regex/regcomp.c b/lib/libc/regex/regcomp.c index 09b12ccc5a0e..d356d80c5f8b 100644 --- a/lib/libc/regex/regcomp.c +++ b/lib/libc/regex/regcomp.c @@ -672,7 +672,7 @@ p_re(struct parse *p, bc.terminate = false; if (p->pre_parse != NULL) p->pre_parse(p, &bc); - while (MORE() && !SEESPEC('|') && !SEEEND()) { + while (MORE() && (!p->allowbranch || !SEESPEC('|')) && !SEEEND()) { bc.terminate = p->parse_expr(p, &bc); ++bc.nchain; } |