mirror of
https://github.com/Av0idD4rk/packmate.git
synced 2026-10-23 16:31:01 +00:00
Исправлен баг с кэшем паттернов
This commit is contained in:
parent
f5dc4b7b6f
commit
0d63bbf233
@ -68,6 +68,7 @@ public class PatternMatcher {
|
||||
int end = searcher.search(reader) - 1;
|
||||
|
||||
if (end < 0) {
|
||||
searcher.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -90,6 +91,7 @@ public class PatternMatcher {
|
||||
int end = searcher.search(is) - 1;
|
||||
|
||||
if (end < 0) {
|
||||
searcher.reset();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -59,4 +59,8 @@ public class KMPByteSearcher {
|
||||
}
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.lastEnd = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -59,4 +59,8 @@ public class KMPStringSearcher {
|
||||
}
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.lastEnd = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user