Skip to content

Commit 5392031

Browse files
committed
fix: use unsigned query_size when calculating pos_
1 parent 5727513 commit 5392031

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/matcher.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ std::vector<size_t> computeMatch(const CandidateString &subject, const Candidate
129129
switch (trace[pos_]) {
130130
case Direction::UP:
131131
ii--;
132-
pos_ -= query_size_int;
132+
pos_ -= query_size;
133133
break;
134134
case Direction::LEFT:
135135
jj--;
@@ -139,7 +139,7 @@ std::vector<size_t> computeMatch(const CandidateString &subject, const Candidate
139139
matches.emplace_back(ii + offset);
140140
jj--;
141141
ii--;
142-
pos_ -= query_size_int + 1;
142+
pos_ -= query_size + 1;
143143
break;
144144
default:
145145
backtrack = false;

0 commit comments

Comments
 (0)