This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RXf_WHITE never used due to small bug in regcomp.c
[perl5.git] / regcomp.c
index 2cf97ec..688bbc6 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -4677,7 +4677,7 @@ reStudy:
         r->paren_names = (HV*)SvREFCNT_inc(RExC_paren_names);
     else
         r->paren_names = NULL;
-    if (r->prelen == 3 && strEQ("\\s+", r->precomp))
+    if (r->prelen == 3 && strnEQ("\\s+", r->precomp, 3)) /* precomp = "\\s+)" */
        r->extflags |= RXf_WHITE;
     else if (r->prelen == 1 && r->precomp[0] == '^')
         r->extflags |= RXf_START_ONLY;