summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--regexec.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/regexec.c b/regexec.c
index 8c091a172d..61d175ace9 100644
--- a/regexec.c
+++ b/regexec.c
@@ -4260,9 +4260,6 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe
if (swash_fetch(sw, p, do_utf8))
match = TRUE;
else if (flags & ANYOF_FOLD) {
- U8 tmpbuf[UTF8_MAXLEN_FOLD+1];
- STRLEN tmplen;
-
if (!match && lenp && av) {
I32 i;
@@ -4279,15 +4276,13 @@ S_reginclasslen(pTHX_ register regnode *n, register U8* p, STRLEN* lenp, registe
}
}
if (!match) {
+ U8 tmpbuf[UTF8_MAXLEN_FOLD+1];
+ STRLEN tmplen;
+
to_utf8_fold(p, tmpbuf, &tmplen);
if (swash_fetch(sw, tmpbuf, do_utf8))
match = TRUE;
}
- if (!match) {
- to_utf8_upper(p, tmpbuf, &tmplen);
- if (swash_fetch(sw, tmpbuf, do_utf8))
- match = TRUE;
- }
}
}
}