summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/regexec.c b/regexec.c
index d95b27a486..433bbeb8e5 100644
--- a/regexec.c
+++ b/regexec.c
@@ -6335,12 +6335,14 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n,
}
}
if (!match) {
- U8 tmpbuf[UTF8_MAXBYTES_CASE+1];
+ U8 folded[UTF8_MAXBYTES_CASE+1];
- STRLEN tmplen;
- to_utf8_fold(utf8_p, tmpbuf, &tmplen);
- if (swash_fetch(sw, tmpbuf, 1))
+ /* See if the folded version matches */
+ STRLEN foldlen;
+ to_utf8_fold(utf8_p, folded, &foldlen);
+ if (swash_fetch(sw, folded, 1)) { /* 1 => is utf8 */
match = TRUE;
+ }
}
}