diff options
author | Howard Hinnant <hhinnant@apple.com> | 2010-07-29 01:15:27 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2010-07-29 01:15:27 +0000 |
commit | 7949ab0743d9555cb2c2885d9c8e8fc1e0b64265 (patch) | |
tree | 9b24b835ed88120922af1575608e1187e7b7943f /libcxx | |
parent | 36cf119049fad322c4dc4529dda7d5347a1cd212 (diff) | |
download | bcm5719-llvm-7949ab0743d9555cb2c2885d9c8e8fc1e0b64265.tar.gz bcm5719-llvm-7949ab0743d9555cb2c2885d9c8e8fc1e0b64265.zip |
fix bug incrementing past end in search
llvm-svn: 109716
Diffstat (limited to 'libcxx')
-rw-r--r-- | libcxx/include/regex | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/include/regex b/libcxx/include/regex index 519c7236d4e..efcc7df7f6b 100644 --- a/libcxx/include/regex +++ b/libcxx/include/regex @@ -1883,7 +1883,7 @@ public: virtual string speak() const { ostringstream os; - if (__invert_) + if (!__invert_) os << "__word_boundary"; else os << "not __word_boundary"; @@ -5404,7 +5404,7 @@ basic_regex<_CharT, _Traits>::__search( __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) |