]> git.eshelyaron.com Git - emacs.git/commitdiff
coding.c (decode_coding_iso_2022): Fix previous change.
authorKenichi Handa <handa@gnu.org>
Sat, 20 Jul 2013 11:45:50 +0000 (20:45 +0900)
committerKenichi Handa <handa@gnu.org>
Sat, 20 Jul 2013 11:45:50 +0000 (20:45 +0900)
src/coding.c

index ad2042672b2cdb88d28ceb0e5cd77a97c2516966..3acbd090e13775b1aeb80982f99d3439b8a05f2e 100644 (file)
@@ -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;