This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix inability of lex_read_unichar to handle 80-FF under "no utf8;". lex_peek_unichar...
authorEric Brine <ikegami@adaelis.com>
Tue, 20 Sep 2011 00:16:41 +0000 (20:16 -0400)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 21 Sep 2011 04:53:14 +0000 (21:53 -0700)
toke.c

diff --git a/toke.c b/toke.c
index 59177d6..5261c6c 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -1417,7 +1417,10 @@ Perl_lex_read_unichar(pTHX_ U32 flags)
     if (c != -1) {
        if (c == '\n')
            CopLINE_inc(PL_curcop);
-       PL_parser->bufptr += UTF8SKIP(PL_parser->bufptr);
+       if (UTF)
+           PL_parser->bufptr += UTF8SKIP(PL_parser->bufptr);
+       else
+           ++(PL_parser->bufptr);
     }
     return c;
 }