From: Kenichi Handa Date: Mon, 9 Nov 1998 07:06:11 +0000 (+0000) Subject: (string_to_non_ascii_char): Return correct length for X-Git-Tag: emacs-20.4~1284 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1dca54f61ea181bbcab4d75dc2599a28ba0d4024;p=emacs.git (string_to_non_ascii_char): Return correct length for a charset of dimension 2 and composition character. --- diff --git a/src/charset.c b/src/charset.c index 702ec54a42c..a65de79c8a6 100644 --- a/src/charset.c +++ b/src/charset.c @@ -208,8 +208,10 @@ string_to_non_ascii_char (str, len, actual_len, exclude_tail_garbage) if (cmpchar_id >= 0) { c = MAKE_COMPOSITE_CHAR (cmpchar_id); - str += cmpchar_table[cmpchar_id]->len; + str += cmpchar_table[cmpchar_id]->len - 1; } + else + str += bytes - 1; } else { @@ -230,7 +232,7 @@ string_to_non_ascii_char (str, len, actual_len, exclude_tail_garbage) if (CHARSET_DEFINED_P (charset) && CHARSET_DIMENSION (charset) == 2 && str < endp) - c2 = *str & 0x7F; + c2 = *str++ & 0x7F; c = MAKE_NON_ASCII_CHAR (charset, c1, c2); } } while (0);