diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-03 02:09:45 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2000-03-03 02:09:45 +0000 |
commit | ac561586bbd0bfbbfcc37c0f7e0dbc30423d438f (patch) | |
tree | 503f32c65985195025262ac8e20dbcd8cb560fd6 /regcomp.c | |
parent | c4ab3e649c1a1880e275541c3783fe079ee18d91 (diff) | |
download | perl-ac561586bbd0bfbbfcc37c0f7e0dbc30423d438f.tar.gz |
/[[:alpha]/ now dies on unmatched [] instead of
"an unknown character class" (spotted by Tom Christiansen)
p4raw-id: //depot/cfgperl@5465
Diffstat (limited to 'regcomp.c')
-rw-r--r-- | regcomp.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -2820,12 +2820,12 @@ S_regpposixcc(pTHX_ I32 value) } break; } - if ((namedclass == OOB_NAMEDCLASS || - !(posixcc + skip + 2 < PL_regxend && - (posixcc[skip] == ':' && - posixcc[skip + 1] == ']')))) - Perl_croak(aTHX_ "Character class [:%.*s:] unknown", - t - s - 1, s + 1); + if (namedclass == OOB_NAMEDCLASS || + posixcc[skip] != ':' || + posixcc[skip+1] != ']') + Perl_croak(aTHX_ + "Character class [:%.*s:] unknown", + t - s - 1, s + 1); } else if (ckWARN(WARN_REGEXP) && !SIZE_ONLY) /* [[=foo=]] and [[.foo.]] are still future. */ Perl_warner(aTHX_ WARN_REGEXP, |