summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-01-08 16:18:47 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-08 16:29:48 +0000
commitf064b6ad543541f097880302365d24c06f8f0e8c (patch)
tree8ef105a0b5b76c705d1b4464e899584dcebb9e05 /regcomp.c
parent5b71a6a7d9a57910f8176799ca3a0c2e2cc65133 (diff)
downloadperl-f064b6ad543541f097880302365d24c06f8f0e8c.tar.gz
[patch] save a test
Message-Id: <200201081618.g08GIlN02821@crypt.compulink.co.uk> p4raw-id: //depot/perl@14137
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index d8ec0a920e..8399899271 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -3459,8 +3459,9 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state)
if (!SIZE_ONLY && ckWARN(WARN_REGEXP) && POSIXCC(nextvalue))
checkposixcc(pRExC_state);
- if (UCHARAT(RExC_parse) == ']' || UCHARAT(RExC_parse) == '-')
- goto charclassloop; /* allow 1st char to be ] or - */
+ /* allow 1st char to be ] (allowing it to be - is dealt with later) */
+ if (UCHARAT(RExC_parse) == ']')
+ goto charclassloop;
while (RExC_parse < RExC_end && UCHARAT(RExC_parse) != ']') {