From bc140f1948d639f0b9850f56c099bf93b6da0b07 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Fri, 8 Oct 2004 12:45:31 +0000 Subject: [PATCH] Added fix to ensure that expressions prefixed with \` do not scan through the text unnecessarily. [SVN r25625] --- include/boost/regex/v4/regex_compile.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/boost/regex/v4/regex_compile.hpp b/include/boost/regex/v4/regex_compile.hpp index bcc457b1..0a0d8d6e 100644 --- a/include/boost/regex/v4/regex_compile.hpp +++ b/include/boost/regex/v4/regex_compile.hpp @@ -2100,6 +2100,8 @@ template unsigned int BOOST_REGEX_CALL reg_expression::fixup_leading_rep(re_detail::re_syntax_base* dat, re_detail::re_syntax_base* arg_end) { unsigned int len = 0; + if((_restart_type >= restart_word) || (_restart_type <= restart_continue)) + return 0; bool leading_lit = arg_end ? false : true; while(dat != arg_end) {