Add missing optimization for leading .* repeats.

Fixes #7758.

[SVN r81705]
This commit is contained in:
John Maddock
2012-12-04 16:51:18 +00:00
parent 333bdbaf14
commit 4162776575

View File

@ -1268,6 +1268,9 @@ bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool
}while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
}
// remember where we got to if this is a leading repeat:
if((rep->leading) && (count < rep->max))
restart = position;
if(position == last)
{
// can't repeat any more, remove the pushed state: