diff options
author | Yves Orton <demerphq@gmail.com> | 2010-11-02 11:29:18 +0100 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2010-11-02 11:44:58 +0100 |
commit | d085b4908fc15b9d48cec72b473eec9d0870015b (patch) | |
tree | 9235eaf16e4fcd0df0bb3ef2e4672a43bcf0de6a /regexec.c | |
parent | aca53033b83659a859fd8408e90d33b842414c39 (diff) | |
download | perl-d085b4908fc15b9d48cec72b473eec9d0870015b.tar.gz |
Fix RT-70998: qq{\x{30ab}} =~ /\xab|\xa9/ produces warningscompile
Diffstat (limited to 'regexec.c')
-rw-r--r-- | regexec.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -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; |