RXf_WHITE never used due to small bug in regcomp.c
Ævar Arnfjörð Bjarmason [Sat, 7 Apr 2007 00:17:05 +0000 (00:17 +0000)]
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Message-ID: <51dd1af80704061717s44107fb9jf468ef28080d33a6@mail.gmail.com>

p4raw-id: //depot/perl@30871

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;