[PATCH] less: fix numeric input

Denys Vlasenko vda.linux at googlemail.com
Fri Jul 31 13:34:16 UTC 2015


Applied, thanks!


On Tue, Jul 21, 2015 at 9:12 PM, Ron Yorston <rmy at pobox.com> wrote:
> Signed-off-by: Ron Yorston <rmy at pobox.com>
> ---
>  miscutils/less.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/miscutils/less.c b/miscutils/less.c
> index 90c1038..d6c921d1 100644
> --- a/miscutils/less.c
> +++ b/miscutils/less.c
> @@ -1259,7 +1259,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);
> --
> 2.4.3
>
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox


More information about the busybox mailing list