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
1 changed files with 1 additions and 1 deletions

View File

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