Fix for issue #2188.

[SVN r48185]
This commit is contained in:
John Maddock
2008-08-17 11:15:07 +00:00
parent 3a15c301db
commit 1012d28c32
2 changed files with 6 additions and 1 deletions

View File

@ -477,7 +477,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
}
if(take_first || (next_count->get_id() != rep->id))
if((m_backup_state->id != saved_state_repeater_count)
|| (static_cast<saved_repeater<BidiIterator>*>(m_backup_state)->count.get_id() != rep->id)
|| (next_count->get_id() != rep->id))
{
// we're moving to a different repeat from the last
// one, so set up a counter object: