Fix string size on regexp search all

This commit is contained in:
Felipe Zimmerle 2017-01-13 23:36:34 -03:00
parent 36d6bb9664
commit 3a413080f9
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -87,7 +87,7 @@ std::list<SMatch> Regex::searchAll(const std::string& s) {
size_t start = ovector[2*i];
size_t end = ovector[2*i+1];
size_t len = end - start;
if (end >= s.size()) {
if (end > s.size()) {
continue;
}
match.match = std::string(tmpString, start, len);