1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-30 04:10:54 -08:00

(XTread_socket) <KeyPress>: Don't use

STRING_CHAR_AND_LENGTH if nchars == nbytes.  From Kenichi Handa
<handa@etl.go.jp>.
This commit is contained in:
Gerd Moellmann 2001-10-29 09:44:31 +00:00
parent 058fb10a33
commit fee2aedc37

View file

@ -10593,8 +10593,12 @@ XTread_socket (sd, bufp, numchars, expected)
character events. */
for (i = 0; i < nbytes; i += len)
{
c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
nbytes - i, len);
if (nchars == nbytes)
c = copy_bufptr[i], len = 1;
else
c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
nbytes - i, len);
bufp->kind = (SINGLE_BYTE_CHAR_P (c)
? ascii_keystroke
: multibyte_char_keystroke);