From 896733800d84393e96f984a26c84021f69e67a6e Mon Sep 17 00:00:00 2001 From: cyanpencil Date: Mon, 16 Jul 2018 19:52:59 +0200 Subject: [PATCH] Parse grep line only if there is a digit afterward : --- libr/cons/grep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/cons/grep.c b/libr/cons/grep.c index c4fca6265fbef..7bf7f1f04885b 100644 --- a/libr/cons/grep.c +++ b/libr/cons/grep.c @@ -255,7 +255,7 @@ static void parse_grep_expression(const char *str) { ptr2 = strchr_ns (ptr, ':'); // line number grep->range_line = 2; // there is not : - if (ptr2 && ptr2[1] != ':' && ptr2[1]) { + if (ptr2 && ptr2[1] != ':' && ptr2[1] && (IS_DIGIT (ptr2[1]) || ptr2[1] == '-' || ptr2[1] == '.')) { end_ptr = end_ptr ? R_MIN (end_ptr, ptr2) : ptr2; char *p, *token = ptr2 + 1; p = strstr (token, "..");