[cfe-commits] [libcxx] r109716 - /libcxx/trunk/include/regex
Howard Hinnant
hhinnant at apple.com
Wed Jul 28 18:15:27 PDT 2010
Author: hhinnant
Date: Wed Jul 28 20:15:27 2010
New Revision: 109716
URL: http://llvm.org/viewvc/llvm-project?rev=109716&view=rev
Log:
fix bug incrementing past end in search
Modified:
libcxx/trunk/include/regex
Modified: libcxx/trunk/include/regex
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/regex?rev=109716&r1=109715&r2=109716&view=diff
==============================================================================
--- libcxx/trunk/include/regex (original)
+++ libcxx/trunk/include/regex Wed Jul 28 20:15:27 2010
@@ -1883,7 +1883,7 @@
virtual string speak() const
{
ostringstream os;
- if (__invert_)
+ if (!__invert_)
os << "__word_boundary";
else
os << "not __word_boundary";
@@ -5404,7 +5404,7 @@
__m.__suffix_.matched = __m.__suffix_.first != __m.__suffix_.second;
return true;
}
- if (!(__flags & regex_constants::match_continuous))
+ if (__first != __last && !(__flags & regex_constants::match_continuous))
{
__m.__matches_.assign(__m.size(), __m.__unmatched_);
for (++__first; __first != __last; ++__first)
More information about the cfe-commits
mailing list