diff --git a/include/boost/regex/v4/perl_matcher_common.hpp b/include/boost/regex/v4/perl_matcher_common.hpp index f08e9d43..a0973da9 100644 --- a/include/boost/regex/v4/perl_matcher_common.hpp +++ b/include/boost/regex/v4/perl_matcher_common.hpp @@ -777,7 +777,7 @@ inline bool perl_matcher::match_assert_backref( { // Have we recursed into subexpression "index"? // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1. - int idx = -index-1; + int idx = -(index+1); if(idx >= 10000) { named_subexpressions::range_type r = re.get_data().equal_range(idx);