c1 = *(U8*)m;
c2 = PL_fold_locale[c1];
do_exactf:
- e = do_utf8 ? s + ln - 1 : strend - ln;
+ e = do_utf8 ? s + ln : strend - ln;
if (norun && e < s)
e = s; /* Due to minlen logic of intuit() */
U8 tmpbuf [UTF8_MAXLEN+1];
U8 foldbuf[UTF8_MAXLEN_FOLD+1];
STRLEN len, foldlen;
- char* se;
if (c1 == c2) {
while (s <= e) {
c = utf8_to_uvchr((U8*)s, &len);
if ( c == c1
&& (ln == len ||
- ((se = e + 1) &&
- !ibcmp_utf8(s, &se, 0, do_utf8,
- m, 0 , ln, UTF)))
+ ibcmp_utf8(s, 0 , 0, do_utf8,
+ m, 0 , ln, UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
else {
if ( (c == c1 || c == c2)
&& (ln == len ||
- ((se = e + 1) &&
- !ibcmp_utf8(s, &se, 0, do_utf8,
- m, 0, ln, UTF)))
+ ibcmp_utf8(s, 0, 0, do_utf8,
+ m, 0, ln, UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
else {