Parse grep line only if there is a digit afterward :

This commit is contained in:
cyanpencil 2018-07-16 19:52:59 +02:00 committed by radare
parent 8f3b7f4870
commit 94f753ac52

View File

@ -255,7 +255,7 @@ while_end:
ptr2 = strchr_ns (ptr, ':'); // line number ptr2 = strchr_ns (ptr, ':'); // line number
grep->range_line = 2; // there is not : 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; end_ptr = end_ptr ? R_MIN (end_ptr, ptr2) : ptr2;
char *p, *token = ptr2 + 1; char *p, *token = ptr2 + 1;
p = strstr (token, ".."); p = strstr (token, "..");