diff options
author | Howard Hinnant <hhinnant@apple.com> | 2013-04-04 15:40:48 +0000 |
---|---|---|
committer | Howard Hinnant <hhinnant@apple.com> | 2013-04-04 15:40:48 +0000 |
commit | b13fcad677463c64a7edf9b6d1c41d3b9ef3c160 (patch) | |
tree | 5da8ff7ea692ff0abc934c59a6d6e574700382f5 /libcxx/include/algorithm | |
parent | bcbb13d69143c2c42d6b50116c06307f995021a6 (diff) | |
download | bcm5719-llvm-b13fcad677463c64a7edf9b6d1c41d3b9ef3c160.tar.gz bcm5719-llvm-b13fcad677463c64a7edf9b6d1c41d3b9ef3c160.zip |
Somehow search_n never got tested, so of course it had a bug in it. This fixes http://llvm.org/bugs/show_bug.cgi?id=15667.
llvm-svn: 178764
Diffstat (limited to 'libcxx/include/algorithm')
-rw-r--r-- | libcxx/include/algorithm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libcxx/include/algorithm b/libcxx/include/algorithm index 4adcc69674c..39191db9776 100644 --- a/libcxx/include/algorithm +++ b/libcxx/include/algorithm @@ -1398,7 +1398,7 @@ __search_n(_RandomAccessIterator __first, _RandomAccessIterator __last, // Find first element in sequence that matchs __value_, with a mininum of loop checks while (true) { - if (__first == __s) // return __last if no element matches __value_ + if (__first >= __s) // return __last if no element matches __value_ return __last; if (__pred(*__first, __value_)) break; |