From 3a413080f90bc4657164a95e6e40ea57a71743b9 Mon Sep 17 00:00:00 2001 From: Felipe Zimmerle Date: Fri, 13 Jan 2017 23:36:34 -0300 Subject: [PATCH] Fix string size on regexp search all --- src/utils/regex.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/regex.cc b/src/utils/regex.cc index 449eb605..fd857154 100644 --- a/src/utils/regex.cc +++ b/src/utils/regex.cc @@ -87,7 +87,7 @@ std::list 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);