From a6c253264f5ce1d39d506f8aed7cdd40b3bac747 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 6 Nov 1998 00:44:16 +0000 Subject: [PATCH] (string_to_non_ascii_char): Fix previous change. --- src/charset.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/charset.c b/src/charset.c index 1e373ff6304..fc53e751209 100644 --- a/src/charset.c +++ b/src/charset.c @@ -217,12 +217,13 @@ string_to_non_ascii_char (str, len, actual_len, exclude_tail_garbage) int char_bytes = BYTES_BY_CHAR_HEAD (c); str++; - if (c >= LEADING_CODE_PRIVATE_11) + if (c >= LEADING_CODE_PRIVATE_11 && c <= LEADING_CODE_PRIVATE_22) charset = *str++; - if (CHARSET_DEFINED_P (charset) && char_bytes <= bytes) + if (char_bytes <= bytes) { c1 = *str++ & 0x7f; - if (CHARSET_DIMENSION (charset) == 2) + if (CHARSET_DEFINED_P (charset) + && CHARSET_DIMENSION (charset) == 2) c2 = *str & 0x7F; c = MAKE_NON_ASCII_CHAR (charset, c1, c2); if (exclude_tail_garbage) -- 2.39.2