Fixed nasty bug, where some invalid expressions caused access violations.

[SVN r10688]
This commit is contained in:
John Maddock
2001-07-22 10:26:54 +00:00
parent f5f309be54
commit e7b8b5712d

View File

@ -1379,12 +1379,12 @@ unsigned int BOOST_RE_CALL reg_expression<charT, traits, Allocator>::set_express
{ {
((re_detail::re_jump*)dat)->alt.i = data.size(); ((re_detail::re_jump*)dat)->alt.i = data.size();
mark.pop(); mark.pop();
dat = (re_detail::re_jump*)((unsigned char*)data.data() + mark.peek());
if(mark.empty()) if(mark.empty())
{ {
fail(REG_EPAREN); fail(REG_EPAREN);
return error_code(); 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)); dat = add_simple(0, re_detail::syntax_element_endmark, sizeof(re_detail::re_brace));