Mercurial > emacs
changeset 83056:d651f25811d5
Allow tty_read_avail_input to use the whole input buffer.
src/keyboard.c (tty_read_avail_input): Use a cbuf of size numchar, not numchar-1.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-96
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Wed, 25 Feb 2004 02:55:32 +0000 |
parents | e6b7cd8486dd |
children | 8a5c2390bc7d |
files | src/keyboard.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Wed Feb 25 00:53:40 2004 +0000 +++ b/src/keyboard.c Wed Feb 25 02:55:32 2004 +0000 @@ -6685,10 +6685,10 @@ struct input_event *buf, int numchars, int expected) { - /* Using numchars - 1 here avoids reading more than the buf can + /* Using numchars here avoids reading more than the buf can really hold. That may prevent loss of characters on some systems when input is stuffed at us. */ - unsigned char cbuf[numchars - 1]; + unsigned char cbuf[numchars]; int n_to_read, i; struct tty_display_info *tty = display->display_info.tty; int nread = 0;