diff options
author | gabor <gabor@FreeBSD.org> | 2011-10-12 01:09:57 +0000 |
---|---|---|
committer | gabor <gabor@FreeBSD.org> | 2011-10-12 01:09:57 +0000 |
commit | 16b6dcb0546d80677df3db7a24b0069d738baceb (patch) | |
tree | 6fb0ca6515ccd4aa853cbf61f0e16a5ca1c02f0b /usr.bin/grep | |
parent | afe335edb5ec5cb5b15074c5f300c5055f76f73b (diff) | |
download | FreeBSD-src-16b6dcb0546d80677df3db7a24b0069d738baceb.zip FreeBSD-src-16b6dcb0546d80677df3db7a24b0069d738baceb.tar.gz |
- Fix counting of match limit (-m)
Reported by: Nali Toja <nalitoja@gmail.com>
Approved by: delphij (mentor)
Diffstat (limited to 'usr.bin/grep')
-rw-r--r-- | usr.bin/grep/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/grep/util.c b/usr.bin/grep/util.c index e209968..785961b 100644 --- a/usr.bin/grep/util.c +++ b/usr.bin/grep/util.c @@ -233,7 +233,7 @@ procfile(const char *fn) linesqueued++; } c += t; - if (mflag && mcount < 0) + if (mflag && mcount <= 0) break; } if (Bflag > 0) |