aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 249c594d2a8..47092b339fe 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -3027,7 +3027,10 @@ read_avail_input (expected)
3027 nread = (*read_socket_hook) (0, buf, KBD_BUFFER_SIZE, expected, expected); 3027 nread = (*read_socket_hook) (0, buf, KBD_BUFFER_SIZE, expected, expected);
3028 else 3028 else
3029 { 3029 {
3030 unsigned char cbuf[KBD_BUFFER_SIZE]; 3030 /* Using KBD_BUFFER_SIZE - 1 here avoids reading more than
3031 the kbd_buffer can really hold. That may prevent loss
3032 of characters on some systems when input is stuffed at us. */
3033 unsigned char cbuf[KBD_BUFFER_SIZE - 1];
3031 3034
3032#ifdef FIONREAD 3035#ifdef FIONREAD
3033 /* Find out how much input is available. */ 3036 /* Find out how much input is available. */