aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2001-10-29 09:44:31 +0000
committerGerd Moellmann2001-10-29 09:44:31 +0000
commitfee2aedc374f7eb3acd6e3b4d31a4c332e5756bf (patch)
tree6fa7576418c267c0c24117d9198c8298197e8761
parent058fb10a33d032135961c8e7d89e0a3120c683c7 (diff)
downloademacs-fee2aedc374f7eb3acd6e3b4d31a4c332e5756bf.tar.gz
emacs-fee2aedc374f7eb3acd6e3b4d31a4c332e5756bf.zip
(XTread_socket) <KeyPress>: Don't use
STRING_CHAR_AND_LENGTH if nchars == nbytes. From Kenichi Handa <handa@etl.go.jp>.
-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);