From e7b8b5712d7a2a74ae9871d509e4338c9f8f9715 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sun, 22 Jul 2001 10:26:54 +0000 Subject: [PATCH] Fixed nasty bug, where some invalid expressions caused access violations. [SVN r10688] --- include/boost/regex/detail/regex_compile.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/regex/detail/regex_compile.hpp b/include/boost/regex/detail/regex_compile.hpp index d0bf003e..9af0863f 100644 --- a/include/boost/regex/detail/regex_compile.hpp +++ b/include/boost/regex/detail/regex_compile.hpp @@ -1379,12 +1379,12 @@ unsigned int BOOST_RE_CALL reg_expression::set_express { ((re_detail::re_jump*)dat)->alt.i = data.size(); mark.pop(); - dat = (re_detail::re_jump*)((unsigned char*)data.data() + mark.peek()); if(mark.empty()) { fail(REG_EPAREN); return error_code(); } + dat = (re_detail::re_jump*)((unsigned char*)data.data() + mark.peek()); } dat = add_simple(0, re_detail::syntax_element_endmark, sizeof(re_detail::re_brace));