[PATCH] less: fix numeric input

Ron Yorston rmy at pobox.com
Tue Jul 21 19:12:31 UTC 2015


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



More information about the busybox mailing list