Skip to content

Commit 3a41308

Browse files
committed
Fix string size on regexp search all
1 parent 36d6bb9 commit 3a41308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/regex.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) {
8787
size_t start = ovector[2*i];
8888
size_t end = ovector[2*i+1];
8989
size_t len = end - start;
90-
if (end >= s.size()) {
90+
if (end > s.size()) {
9191
continue;
9292
}
9393
match.match = std::string(tmpString, start, len);

0 commit comments

Comments
 (0)