Another UTF-8 locale tweak from Hugo.
Jarkko Hietaniemi [Mon, 1 Apr 2002 02:30:18 +0000 (02:30 +0000)]
p4raw-id: //depot/perl@15647

regexec.c

index be4b362..a2c0c72 100644 (file)
--- a/regexec.c
+++ b/regexec.c
@@ -1013,7 +1013,7 @@ S_find_byclass(pTHX_ regexp * prog, regnode *c, char *s, char *strend, char *sta
            c1 = *(U8*)m;
            c2 = PL_fold_locale[c1];
          do_exactf:
-           e = do_utf8 ? s + ln : strend - ln;
+           e = HOP3c(strend, -ln, s);
 
            if (norun && e < s)
                e = s;                  /* Due to minlen logic of intuit() */