diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-11 21:17:55 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-03-11 21:17:55 +0100 |
commit | 58f108eb339957f58d5a6034d82b09c4d50b53e3 (patch) | |
tree | 4fdfae71136811f3b9c8ffd56656b78da19739da /miscutils/less.c | |
parent | b0a57abb79001b994115d2c96a7d9e1f2f511430 (diff) | |
download | busybox-w32-58f108eb339957f58d5a6034d82b09c4d50b53e3.tar.gz busybox-w32-58f108eb339957f58d5a6034d82b09c4d50b53e3.tar.bz2 busybox-w32-58f108eb339957f58d5a6034d82b09c4d50b53e3.zip |
lineedit: fix another corner case with bad unicode input
function old new delta
read_key 607 646 +39
readit 50 55 +5
getch_nowait 290 295 +5
hash_find 233 234 +1
xstrtoul_range_sfx 231 230 -1
passwd_main 1058 1056 -2
builtin_exit 45 43 -2
cmp_main 649 645 -4
lineedit_read_key 257 245 -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/5 up/down: 50/-21) Total: 29 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/less.c')
-rw-r--r-- | miscutils/less.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c index 92d0f3271..e4f8ab979 100644 --- a/miscutils/less.c +++ b/miscutils/less.c | |||
@@ -855,7 +855,7 @@ static int getch_nowait(void) | |||
855 | 855 | ||
856 | /* We have kbd_fd in O_NONBLOCK mode, read inside read_key() | 856 | /* We have kbd_fd in O_NONBLOCK mode, read inside read_key() |
857 | * would not block even if there is no input available */ | 857 | * would not block even if there is no input available */ |
858 | rd = read_key(kbd_fd, kbd_input); | 858 | rd = read_key(kbd_fd, kbd_input, /*timeout off:*/ -2); |
859 | if (rd == -1) { | 859 | if (rd == -1) { |
860 | if (errno == EAGAIN) { | 860 | if (errno == EAGAIN) { |
861 | /* No keyboard input available. Since poll() did return, | 861 | /* No keyboard input available. Since poll() did return, |