diff options
| -rw-r--r-- | src/keyboard.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index de91b40d295..9c41fa91351 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -6685,10 +6685,10 @@ tty_read_avail_input (struct display *display, | |||
| 6685 | struct input_event *buf, | 6685 | struct input_event *buf, |
| 6686 | int numchars, int expected) | 6686 | int numchars, int expected) |
| 6687 | { | 6687 | { |
| 6688 | /* Using numchars - 1 here avoids reading more than the buf can | 6688 | /* Using numchars here avoids reading more than the buf can |
| 6689 | really hold. That may prevent loss of characters on some systems | 6689 | really hold. That may prevent loss of characters on some systems |
| 6690 | when input is stuffed at us. */ | 6690 | when input is stuffed at us. */ |
| 6691 | unsigned char cbuf[numchars - 1]; | 6691 | unsigned char cbuf[numchars]; |
| 6692 | int n_to_read, i; | 6692 | int n_to_read, i; |
| 6693 | struct tty_display_info *tty = display->display_info.tty; | 6693 | struct tty_display_info *tty = display->display_info.tty; |
| 6694 | int nread = 0; | 6694 | int nread = 0; |