diff --git a/src/grep.c b/src/grep.c index acc08c7..7c0f8a8 100644 --- a/src/grep.c +++ b/src/grep.c @@ -1043,7 +1043,7 @@ prtext (char const *beg, char const *lim) } after_last_match = bufoffset - (buflim - p); - pending = out_quiet ? 0 : out_after; + pending = out_quiet ? 0 : MAX (0, out_after); used = true; outleft -= n; }