aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 1ea8a801fbf..3944556d57a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10593,8 +10593,12 @@ XTread_socket (sd, bufp, numchars, expected)
10593 character events. */ 10593 character events. */
10594 for (i = 0; i < nbytes; i += len) 10594 for (i = 0; i < nbytes; i += len)
10595 { 10595 {
10596 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i, 10596 if (nchars == nbytes)
10597 nbytes - i, len); 10597 c = copy_bufptr[i], len = 1;
10598 else
10599 c = STRING_CHAR_AND_LENGTH (copy_bufptr + i,
10600 nbytes - i, len);
10601
10598 bufp->kind = (SINGLE_BYTE_CHAR_P (c) 10602 bufp->kind = (SINGLE_BYTE_CHAR_P (c)
10599 ? ascii_keystroke 10603 ? ascii_keystroke
10600 : multibyte_char_keystroke); 10604 : multibyte_char_keystroke);