Allow empty strings to be evaluated by regex::searchAll

This commit is contained in:
Victor Hora
2018-06-18 22:01:07 -03:00
committed by Felipe Zimmerle
parent 7def498c4c
commit fd8e72fd97
3 changed files with 55 additions and 5 deletions

View File

@@ -91,16 +91,16 @@ std::list<SMatch> Regex::searchAll(const std::string& s) {
rc = 0;
break;
}
if (len == 0) {
rc = 0;
break;
}
match.match = std::string(tmpString, start, len);
match.m_offset = start;
match.m_length = len;
offset = start + len;
retList.push_front(match);
if (len == 0) {
rc = 0;
break;
}
}
} while (rc > 0);