diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-19 16:01:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-10-20 08:00:32 +0200 |
commit | 35e80e9726b5fee6a00caa58349a4b5d924dad7c (patch) | |
tree | 3f92cdee5079affdc40b73f26845d73e9a994412 /comphelper | |
parent | a3143aa0dec78177e522858fbf786494c75512a0 (diff) |
when calling std::lower_bound
it's not enough to compare != end(), you also need to compare the key
against the iterator result
Change-Id: Ide5f151ba2297a35e5546f47fbc3c53cbe5ab533
Reviewed-on: https://gerrit.libreoffice.org/62014
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/property/propagg.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx index d1f6e3a76c17..1e618694f465 100644 --- a/comphelper/source/property/propagg.cxx +++ b/comphelper/source/property/propagg.cxx @@ -239,7 +239,7 @@ sal_Int32 OPropertyArrayAggregationHelper::fillHandles( { aNameProp.Name = pReqProps[i]; auto findIter = std::lower_bound(m_aProperties.begin(), m_aProperties.end(), aNameProp, PropertyCompareByName()); - if ( findIter != m_aProperties.end() ) + if ( findIter != m_aProperties.end() && !PropertyCompareByName()(*findIter, aNameProp)) { _pHandles[i] = findIter->Handle; nHitCount++; |