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:
parent
84f65b5513
commit
7d5c9792f7
1 changed files with 6 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue