1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-24 13:32:41 -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:45:37 +00:00
parent 84f65b5513
commit 7d5c9792f7

View file

@ -10578,8 +10578,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);