summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorEric Brine <ikegami@adaelis.com>2011-09-19 20:16:41 -0400
committerFather Chrysostomos <sprout@cpan.org>2011-09-20 21:53:14 -0700
commitd9018cbe5b480ba29cc6151aba8f5102a7e009c4 (patch)
tree30cf2aadb1a7590e14d06112c006eda450a69283 /toke.c
parent41e56bcf1032d456109d04949b3808096b9e7f8b (diff)
downloadperl-d9018cbe5b480ba29cc6151aba8f5102a7e009c4.tar.gz
Fix inability of lex_read_unichar to handle 80-FF under "no utf8;". lex_peek_unichar is already correct.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 59177d6554..5261c6c379 100644
--- 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;
}