Mercurial > emacs
changeset 23877:2d62a1611751
(string_char_to_byte): Handle invalid multibyte sequence
correctly.
(string_byte_to_char): Likesize.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Tue, 15 Dec 1998 04:35:38 +0000 |
parents | 8d2f38338c81 |
children | 0d713a8426b6 |
files | src/fns.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fns.c Tue Dec 15 04:35:38 1998 +0000 +++ b/src/fns.c Tue Dec 15 04:35:38 1998 +0000 @@ -845,7 +845,7 @@ while (best_above_byte > 0 && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) best_above_byte--; - if (XSTRING (string)->data[best_above_byte] < 0x80) + if (!BASE_LEADING_CODE_P (XSTRING (string)->data[best_above_byte])) best_above_byte = best_above_byte_saved; best_above--; } @@ -911,7 +911,7 @@ while (best_above_byte > 0 && !CHAR_HEAD_P (XSTRING (string)->data[best_above_byte])) best_above_byte--; - if (XSTRING (string)->data[best_above_byte] < 0x80) + if (!BASE_LEADING_CODE_P (XSTRING (string)->data[best_above_byte])) best_above_byte = best_above_byte_saved; best_above--; }