diff options
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1614,7 +1614,7 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle return 0; goto next_line; } - if (hit) { + if (hit && (opt->max_count < 0 || count < opt->max_count)) { count++; if (opt->status_only) return 1; |