From 832ecee3c089e94a3cf1f6024c62f415df40f0cd Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Sat, 29 Nov 2014 22:40:34 -0700 Subject: 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. --- perly.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perly.c') 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 } -- cgit v1.2.1