diff options
author | Hugo van der Sanden <hv@crypt.org> | 1999-01-31 01:50:06 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-15 00:24:34 +0000 |
commit | ce3e6498997f4e021f5bd71c1348f2c333883083 (patch) | |
tree | cbc178322a95feb84632558bebbbc56bc660c101 /regcomp.c | |
parent | 01667c76fff175a3f8041fcd624d7ae3e129b4d7 (diff) | |
download | perl-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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); } |