Change 34697 by [EMAIL PROTECTED] on 2008/11/02 18:31:19

        Subject: [perl #56526] m/a{1,0}/ compiles but doesn't match a literal 
string 
        From: Michael Cartmell (via RT) <[EMAIL PROTECTED]>
        Date: Wed, 02 Jul 2008 05:17:58 -0700
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/regcomp.c#669 edit
... //depot/perl/t/op/re_tests#134 edit

Differences ...

==== //depot/perl/regcomp.c#669 (text) ====
Index: perl/regcomp.c
--- perl/regcomp.c#668~34694~   2008-11-02 08:50:12.000000000 -0800
+++ perl/regcomp.c      2008-11-02 10:31:19.000000000 -0800
@@ -6452,7 +6452,7 @@
                *flagp = WORST;
            if (max > 0)
                *flagp |= HASWIDTH;
-           if (max && max < min)
+           if (max < min)
                vFAIL("Can't do {n,m} with n > m");
            if (!SIZE_ONLY) {
                ARG1_SET(ret, (U16)min);

==== //depot/perl/t/op/re_tests#134 (text) ====
Index: perl/t/op/re_tests
--- perl/t/op/re_tests#133~34400~       2008-09-22 13:39:30.000000000 -0700
+++ perl/t/op/re_tests  2008-11-02 10:31:19.000000000 -0800
@@ -618,6 +618,7 @@
 ((?>[^()]+)|\([^()]*\))+       ((abc(ade)ufh()()x      y       $&      
abc(ade)ufh()()x
 (?<=x+)y       -       c       -       Variable length lookbehind not 
implemented
 a{37,17}       -       c       -       Can't do {n,m} with n > m
+a{37,0}        -       c       -       Can't do {n,m} with n > m
 \Z     a\nb\n  y       $-[0]   3
 \z     a\nb\n  y       $-[0]   4
 $      a\nb\n  y       $-[0]   3
End of Patch.

Reply via email to