# HG changeset patch # User Gerd Moellmann # Date 1004348671 0 # Node ID 3f11c065fa9e0419432f4ec564666b424de232ef # Parent 225bd38b0ce7ecc9a8560be85d10f156f26ba3b6 (XTread_socket) : Don't use STRING_CHAR_AND_LENGTH if nchars == nbytes. From Kenichi Handa . diff -r 225bd38b0ce7 -r 3f11c065fa9e src/xterm.c --- a/src/xterm.c Mon Oct 29 09:35:04 2001 +0000 +++ b/src/xterm.c Mon Oct 29 09:44:31 2001 +0000 @@ -10593,8 +10593,12 @@ 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);