From 3693a5de10c3cda47a2c8c2828e645b722aba810 Mon Sep 17 00:00:00 2001 From: jzmaddock Date: Thu, 26 Oct 2017 13:05:33 +0100 Subject: [PATCH] Regex: previous fix could go into infinite loop when a comment was followed by a "(", fix that. --- include/boost/regex/v4/basic_regex_parser.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index 3ba17246..7c2852fa 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -1104,8 +1104,10 @@ bool basic_regex_parser::parse_repeat(std::size_t low, std::size_ while ((m_position != m_end) && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) { } + contin = true; } - contin = true; + else + contin = false; } } else