summaryrefslogtreecommitdiffstats
path: root/grep
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-10 01:35:30 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-10 01:35:30 -0400
commit98a48b44bc4158a1e861cffce33609fa99912566 (patch)
tree848ec968fc89d43aed82b3521a0288e5891620dc /grep
parente3da7268362efe120d3a6ea6a68d92d1ee342842 (diff)
Fix off-by-one bug in searcher.
Diffstat (limited to 'grep')
-rw-r--r--grep/src/search.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/grep/src/search.rs b/grep/src/search.rs
index 1b1215eb..33cb0fbe 100644
--- a/grep/src/search.rs
+++ b/grep/src/search.rs
@@ -195,7 +195,7 @@ impl Grep {
let (prevnl, nextnl) = self.find_line(buf, e, e);
match self.re.shortest_match(&buf[prevnl..nextnl]) {
None => {
- start = nextnl + 1;
+ start = nextnl;
continue;
}
Some(_) => {