summaryrefslogtreecommitdiff
path: root/perly.c
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-11-29 22:40:34 -0700
committerKarl Williamson <khw@cpan.org>2014-12-03 13:28:57 -0700
commit832ecee3c089e94a3cf1f6024c62f415df40f0cd (patch)
tree872a2d743eba00e3bb50bbce73905e7aabf95b3d /perly.c
parentf689ad3712ab49cc145f08ba0540043ee9ce5cdc (diff)
downloadperl-832ecee3c089e94a3cf1f6024c62f415df40f0cd.tar.gz
perly.c: Fix off-by-1 error for EBCDIC platforms
Code point 255 was being omitted in the translation. It's better to use the macro (that has it correctly) and avoid a redundant copy of the test.
Diffstat (limited to 'perly.c')
-rw-r--r--perly.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/perly.c b/perly.c
index 034a1a73bf..44d6ce68e4 100644
--- a/perly.c
+++ b/perly.c
@@ -325,8 +325,8 @@ Perl_yyparse (pTHX_ int gramtype)
* on a platform that doesn't use ASCII, this translation back would need to be
* removed */
# ifdef EBCDIC
- if (parser->yychar >= 0 && parser->yychar < 255) {
- parser->yychar = NATIVE_TO_LATIN1(parser->yychar);
+ if (parser->yychar >= 0) {
+ parser->yychar = NATIVE_TO_UNI(parser->yychar);
}
# endif
}