diff --git a/include/boost/re_detail/regex_compile.hpp b/include/boost/re_detail/regex_compile.hpp index adff8987..6b1b1f5e 100644 --- a/include/boost/re_detail/regex_compile.hpp +++ b/include/boost/re_detail/regex_compile.hpp @@ -1603,7 +1603,8 @@ unsigned int BOOST_RE_CALL reg_expression::set_express //unsigned pos = (char*)dat - (char*)data.data(); // add the trailing jump: - add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size); + dat = add_simple(dat, re_detail::syntax_element_jump, re_detail::re_jump_size); + ((re_detail::re_jump*)dat)->alt.i = 0; // now insert the leading repeater: dat = (re_detail::re_syntax_base*)data.insert(offset, re_detail::re_repeater_size);