less: fix numeric input

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Ron Yorston 2015-07-21 20:12:31 +01:00 committed by Denys Vlasenko
parent 670c3f7822
commit ae1a9e899e

View File

@ -1314,7 +1314,7 @@ static void number_process(int first_digit)
i = 1; i = 1;
while (i < sizeof(num_input)-1) { while (i < sizeof(num_input)-1) {
keypress = less_getch(i + 1); keypress = less_getch(i + 1);
if ((unsigned)keypress > 255 || !isdigit(num_input[i])) if ((unsigned)keypress > 255 || !isdigit(keypress))
break; break;
num_input[i] = keypress; num_input[i] = keypress;
bb_putchar(keypress); bb_putchar(keypress);