Fix bug that prevents turning off multiple Perl-modifiers at once.

Fixes #5223.

[SVN r69775]
This commit is contained in:
John Maddock
2011-03-09 18:12:18 +00:00
parent 7ed55a515e
commit 463417caba
2 changed files with 3 additions and 0 deletions

View File

@ -2711,6 +2711,8 @@ regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_opt
} }
} }
while(!breakout); while(!breakout);
breakout = false;
if(*m_position == static_cast<charT>('-')) if(*m_position == static_cast<charT>('-'))
{ {

View File

@ -337,6 +337,7 @@ void test_options2()
TEST_REGEX_SEARCH("(?s).", perl, "\n", match_default|match_not_dot_newline, make_array(0, 1, -2, -2)); TEST_REGEX_SEARCH("(?s).", perl, "\n", match_default|match_not_dot_newline, make_array(0, 1, -2, -2));
TEST_REGEX_SEARCH("(?-s).", perl, "\n", match_default, make_array(-2, -2)); TEST_REGEX_SEARCH("(?-s).", perl, "\n", match_default, make_array(-2, -2));
TEST_REGEX_SEARCH("(?-s).", perl, "\n", match_default|match_not_dot_newline, make_array(-2, -2)); TEST_REGEX_SEARCH("(?-s).", perl, "\n", match_default|match_not_dot_newline, make_array(-2, -2));
TEST_REGEX_SEARCH("(?-xism)d", perl, "d", match_default, make_array(0, 1, -2, -2));
test_options3(); test_options3();
} }