forked from boostorg/regex
Updated tests to reflect recent fixes.
Fixed a problem where some invalid expressions would either be accepted, or worse crash. Changed error code for unsupported lookbehind assertions. [SVN r31350]
This commit is contained in:
@ -765,7 +765,7 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
|
||||
{
|
||||
// Oops error:
|
||||
if(0 == this->m_pdata->m_status) // update the error code if not already set
|
||||
this->m_pdata->m_status = boost::regex_constants::error_brack;
|
||||
this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
|
||||
//
|
||||
// clear the expression, we should be empty:
|
||||
//
|
||||
@ -776,8 +776,8 @@ void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
|
||||
//
|
||||
if(0 == (this->flags() & regex_constants::no_except))
|
||||
{
|
||||
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_brack);
|
||||
boost::regex_error e(message, boost::regex_constants::error_brack, 0);
|
||||
std::string message = this->m_pdata->m_ptraits->error_string(boost::regex_constants::error_bad_pattern);
|
||||
boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
|
||||
e.raise();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user