summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/regexec.c b/regexec.c
index 2c9b852754..2e15b45778 100644
--- a/regexec.c
+++ b/regexec.c
@@ -1780,10 +1780,16 @@ S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s,
PerlIO_printf( Perl_debug_log,
" Scanning for legal start char...\n");
}
- );
- while ( uc <= (U8*)last_start && !BITMAP_TEST(bitmap,*uc) ) {
- uc++;
- }
+ );
+ if (utf8_target) {
+ while ( uc <= (U8*)last_start && !BITMAP_TEST(bitmap,*uc) ) {
+ uc += UTF8SKIP(uc);
+ }
+ } else {
+ while ( uc <= (U8*)last_start && !BITMAP_TEST(bitmap,*uc) ) {
+ uc++;
+ }
+ }
s= (char *)uc;
}
if (uc >(U8*)last_start) break;