From d085b4908fc15b9d48cec72b473eec9d0870015b Mon Sep 17 00:00:00 2001 From: Yves Orton Date: Tue, 2 Nov 2010 11:29:18 +0100 Subject: Fix RT-70998: qq{\x{30ab}} =~ /\xab|\xa9/ produces warnings --- regexec.c | 14 ++++++++++---- 1 file 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; -- cgit v1.2.1