summaryrefslogtreecommitdiffstats
path: root/libcxx/include
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include')
-rw-r--r--libcxx/include/algorithm2
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;
OpenPOWER on IntegriCloud