Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Mar 10, 2024
1 parent e254a82 commit c281add
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions deps/streamsearch/sbmh.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,9 @@ class SBMH extends EventEmitter {
}
}

pos += (pos >= 0) * this._bufpos

// Lookbehind buffer is now empty. We only need to check if the
// needle is in the haystack.
pos = data.indexOf(needle, pos)
pos = data.indexOf(needle, pos + ((pos >= 0) * this._bufpos))

if (pos !== -1) {
++this.matches
Expand Down

0 comments on commit c281add

Please sign in to comment.