# HG changeset patch # User Kenichi Handa # Date 1064575213 0 # Node ID 58eb89f2fdfc72fe786941f145efd15d5e2724bd # Parent 1b757cdb61444a0c4651474f4a0d388ae89169a1 (Faset): Check newelt by CHECK_CHARACTER. Don't change multibyteness of the result when newelt is an 8-bit character. diff -r 1b757cdb6144 -r 58eb89f2fdfc src/data.c --- a/src/data.c Thu Sep 18 19:43:25 2003 +0000 +++ b/src/data.c Fri Sep 26 11:20:13 2003 +0000 @@ -1929,7 +1929,7 @@ 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 @@ 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 {