aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1993-11-15 12:28:01 +0000
committerRichard M. Stallman1993-11-15 12:28:01 +0000
commit1727083501a3a25c59544e1d535ae9e5f5ffc8a6 (patch)
tree906d6b72ad946c1354ee8d4f244a180687ebb627
parent5f5783ceb27e497b3805c4d5742d03f66bfd87bd (diff)
downloademacs-1727083501a3a25c59544e1d535ae9e5f5ffc8a6.tar.gz
emacs-1727083501a3a25c59544e1d535ae9e5f5ffc8a6.zip
(read_avail_input): Make cbuf 1 char shorter.
-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. */