diff options
Diffstat (limited to 'findutils/grep.c')
-rw-r--r-- | findutils/grep.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 776a629be..dc26b5f07 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -377,6 +377,8 @@ static int grep_file(FILE *file) | |||
377 | print_line(line + gl->matched_range.rm_so, | 377 | print_line(line + gl->matched_range.rm_so, |
378 | end - gl->matched_range.rm_so, | 378 | end - gl->matched_range.rm_so, |
379 | linenum, ':'); | 379 | linenum, ':'); |
380 | if (old == '\0') | ||
381 | break; | ||
380 | line[end] = old; | 382 | line[end] = old; |
381 | #if !ENABLE_EXTRA_COMPAT | 383 | #if !ENABLE_EXTRA_COMPAT |
382 | if (regexec(&gl->compiled_regex, line + end, | 384 | if (regexec(&gl->compiled_regex, line + end, |