Skip to content

Commit

Permalink
Fixed limit calculation in CaseInsenstiveLiteralMatcher
Browse files Browse the repository at this point in the history
  • Loading branch information
PieterOlivier committed Oct 23, 2024
1 parent 6ea6b2a commit e024303
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public CaseInsensitiveLiteralMatcher(int[][] ciLiteral) {
public MatchResult findMatch(int[] input, int startLocation, int maxLength) {
int length = chars.length;

int limit = input.length - length + 1;
int limit = Math.min(startLocation + maxLength - length, input.length - length + 1);
for (int start=startLocation; start < limit; start++) {
boolean matches = true;
for (int i=0; i<length; i++) {
Expand Down

0 comments on commit e024303

Please sign in to comment.