From 0efe47a860bba25617132f02e2220056bfa098b0 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Sat, 20 Jul 2013 20:45:50 +0900 Subject: [PATCH] coding.c (decode_coding_iso_2022): Fix previous change. --- src/coding.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/coding.c b/src/coding.c index ad2042672b2..3acbd090e13 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3736,8 +3736,9 @@ decode_coding_iso_2022 (struct coding_system *coding) charset = CHARSET_FROM_ID (charset_id_2); ONE_MORE_BYTE (c1); if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0) - || ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) - ? c1 >= 0x80 : c1 < 0x80)) + || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) + && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) + ? c1 >= 0x80 : c1 < 0x80))) goto invalid_code; break; @@ -3752,8 +3753,9 @@ decode_coding_iso_2022 (struct coding_system *coding) charset = CHARSET_FROM_ID (charset_id_3); ONE_MORE_BYTE (c1); if (c1 < 0x20 || (c1 >= 0x80 && c1 < 0xA0) - || ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) - ? c1 >= 0x80 : c1 < 0x80)) + || (! (CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_SEVEN_BITS) + && ((CODING_ISO_FLAGS (coding) & CODING_ISO_FLAG_LEVEL_4) + ? c1 >= 0x80 : c1 < 0x80))) goto invalid_code; break; -- 2.39.2