(replaced by #13336)
[p5sagit/p5-mst-13.2.git] / regexec.c
index d161c1b..a8acb06 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -962,14 +962,17 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
                if (c1 == c2)
                    while (s <= e) {
                        if ( utf8_to_uvchr((U8*)s, &len) == c1
-                            && regtry(prog, s) )
+                            && (ln == 1 ||
+                                ibcmp_utf8(s, do_utf8, m, UTF, ln)) )
                            goto got_it;
                        s += len;
                    }
                else
                    while (s <= e) {
                        UV c = utf8_to_uvchr((U8*)s, &len);
-                       if ( (c == c1 || c == c2) && regtry(prog, s) )
+                       if ( (c == c1 || c == c2)
+                            && (ln == 1 ||
+                                ibcmp_utf8(s, do_utf8, m, UTF, ln)) )
                            goto got_it;
                        s += len;
                    }
@@ -1943,6 +1946,12 @@ S_regtry(pTHX_ regexp *prog, char *startpos)
             New(22,PL_reg_start_tmp, PL_reg_start_tmpl, char*);
     }
 
+#ifdef DEBUGGING
+    sv_setpvn(PERL_DEBUG_PAD(0), "", 0);
+    sv_setpvn(PERL_DEBUG_PAD(1), "", 0);
+    sv_setpvn(PERL_DEBUG_PAD(2), "", 0);
+#endif
+
     /* XXXX What this code is doing here?!!!  There should be no need
        to do this again and again, PL_reglastparen should take care of
        this!  --ilya*/