fix bug incrementing past end in search
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@109716 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a0d045b787
commit
8daa733576
@ -1883,7 +1883,7 @@ public:
|
|||||||
virtual string speak() const
|
virtual string speak() const
|
||||||
{
|
{
|
||||||
ostringstream os;
|
ostringstream os;
|
||||||
if (__invert_)
|
if (!__invert_)
|
||||||
os << "__word_boundary";
|
os << "__word_boundary";
|
||||||
else
|
else
|
||||||
os << "not __word_boundary";
|
os << "not __word_boundary";
|
||||||
@ -5404,7 +5404,7 @@ basic_regex<_CharT, _Traits>::__search(
|
|||||||
__m.__suffix_.matched = __m.__suffix_.first != __m.__suffix_.second;
|
__m.__suffix_.matched = __m.__suffix_.first != __m.__suffix_.second;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!(__flags & regex_constants::match_continuous))
|
if (__first != __last && !(__flags & regex_constants::match_continuous))
|
||||||
{
|
{
|
||||||
__m.__matches_.assign(__m.size(), __m.__unmatched_);
|
__m.__matches_.assign(__m.size(), __m.__unmatched_);
|
||||||
for (++__first; __first != __last; ++__first)
|
for (++__first; __first != __last; ++__first)
|
||||||
|
Loading…
Reference in New Issue
Block a user