From b10d420d0f6d5e36f0dea4d673f942477da29b3a Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 19 Sep 2000 00:33:58 +0000 Subject: [PATCH] (UNIBYTE_STR_AS_MULTIBYTE_P): Fix previous change. --- src/charset.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charset.h b/src/charset.h index 20b1fb72a7b..83b31abf1f6 100644 --- a/src/charset.h +++ b/src/charset.h @@ -448,8 +448,8 @@ extern int width_by_char_head[256]; (((str)[0] < 0x80 || (str)[0] >= 0xA0) \ ? (bytes) = 1 \ : (((bytes) = BYTES_BY_CHAR_HEAD ((str)[0])), \ - ((str)[0] != LEADING_CODE_8_BIT_CONTROL \ - && (bytes) <= (length) \ + ((bytes) > 1 && (bytes) <= (length) \ + && (str)[0] != LEADING_CODE_8_BIT_CONTROL \ && !CHAR_HEAD_P ((str)[1]) \ && ((bytes) == 2 \ || (!CHAR_HEAD_P ((str)[2]) \ -- 2.39.2