diff options
| author | Gerd Moellmann | 2001-10-29 09:44:31 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-10-29 09:44:31 +0000 |
| commit | fee2aedc374f7eb3acd6e3b4d31a4c332e5756bf (patch) | |
| tree | 6fa7576418c267c0c24117d9198c8298197e8761 /src/xterm.c | |
| parent | 058fb10a33d032135961c8e7d89e0a3120c683c7 (diff) | |
| download | emacs-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>.
Diffstat (limited to 'src/xterm.c')
| -rw-r--r-- | src/xterm.c | 8 |
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); |