core: Make TwoWaySearcher reset its prefix memory when shifting by byteset
Closes #16878.
This commit is contained in:
parent
0bdac78da8
commit
e9db8adebb
2 changed files with 9 additions and 0 deletions
|
|
@ -479,6 +479,9 @@ impl TwoWaySearcher {
|
|||
((haystack[self.position + needle.len() - 1] & 0x3f)
|
||||
as uint)) & 1 == 0 {
|
||||
self.position += needle.len();
|
||||
if !long_period {
|
||||
self.memory = 0;
|
||||
}
|
||||
continue 'search;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue