multibyteness of the result when newelt is an 8-bit character.
if (idxval < 0 || idxval >= SCHARS (array))
args_out_of_range (array, idx);
- CHECK_NUMBER (newelt);
+ CHECK_CHARACTER (newelt);
nbytes = SBYTES (array);
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
{