summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>1999-01-31 01:50:06 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-15 00:24:34 +0000
commitce3e6498997f4e021f5bd71c1348f2c333883083 (patch)
treecbc178322a95feb84632558bebbbc56bc660c101 /regcomp.c
parent01667c76fff175a3f8041fcd624d7ae3e129b4d7 (diff)
downloadperl-ce3e6498997f4e021f5bd71c1348f2c333883083.tar.gz
regexp flags bug
Message-Id: <199901310150.BAA16299@crypt.compulink.co.uk> p4raw-id: //depot/perl@2922
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/regcomp.c b/regcomp.c
index 61c3e0d359..5d4c0f0dac 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -1390,8 +1390,11 @@ reg(I32 paren, I32 *flagp)
}
/* Check for proper termination. */
- if (paren && (PL_regcomp_parse >= PL_regxend || *nextchar() != ')')) {
- FAIL("unmatched () in regexp");
+ if (paren) {
+ PL_regflags = oregflags;
+ if (PL_regcomp_parse >= PL_regxend || *nextchar() != ')') {
+ FAIL("unmatched () in regexp");
+ }
}
else if (!paren && PL_regcomp_parse < PL_regxend) {
if (*PL_regcomp_parse == ')') {
@@ -1401,9 +1404,6 @@ reg(I32 paren, I32 *flagp)
FAIL("junk on end of regexp"); /* "Can't happen". */
/* NOTREACHED */
}
- if (paren != 0) {
- PL_regflags = oregflags;
- }
return(ret);
}