From d9130605c62bf2f147d30a960671858d3e1ef86c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 26 Sep 2003 11:20:13 +0000 Subject: [PATCH] (Faset): Check newelt by CHECK_CHARACTER. Don't change multibyteness of the result when newelt is an 8-bit character. --- src/data.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data.c b/src/data.c index 8ee564db821..0e2a704f529 100644 --- a/src/data.c +++ b/src/data.c @@ -1929,7 +1929,7 @@ bool-vector. IDX starts at 0. */) if (idxval < 0 || idxval >= SCHARS (array)) args_out_of_range (array, idx); - CHECK_NUMBER (newelt); + CHECK_CHARACTER (newelt); nbytes = SBYTES (array); @@ -1966,7 +1966,8 @@ bool-vector. IDX starts at 0. */) args_out_of_range (array, idx); CHECK_NUMBER (newelt); - if (XINT (newelt) < 0 || ASCII_CHAR_P (XINT (newelt))) + if (XINT (newelt) < 0 || ASCII_CHAR_P (XINT (newelt)) + || CHAR_BYTE8_P (XINT (newelt))) SSET (array, idxval, XINT (newelt)); else { -- 2.39.2