comphelper/source/misc/accessibletexthelper.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
New commits: commit 3a45029a6bd049006a896a789c7ad45eedfdb924 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri May 6 15:01:59 2022 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri May 6 15:52:39 2022 +0200 Only dereference iterators after checking them Was this way since commit edf11d28fafac50b6380c9372d0e6cf07a355616 Author Vladimir Glazounov <v...@openoffice.org> Date Thu Apr 24 16:27:52 2003 +0000 INTEGRATION: CWS uaa02 (1.3.44); FILE MERGED Surfaced after commit b1148c31ed2786396f0b018a988fce8288f1797d Author Noel Grandin <noel.gran...@collabora.co.uk> Date Wed Apr 27 16:47:53 2022 +0200 use more string_view in comphelper where the pointers were changed to iterators, which are checked in debug builds, failing an assertion. Change-Id: I87fce562aef8f50b94fb52ad6c2a79d2e84d6424 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133934 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx index bd2253ace23e..27747b3bca12 100644 --- a/comphelper/source/misc/accessibletexthelper.cxx +++ b/comphelper/source/misc/accessibletexthelper.cxx @@ -682,9 +682,8 @@ namespace comphelper auto pLastDiffNew = rNewString.end(); // find first difference - while ((*pFirstDiffOld == *pFirstDiffNew) && - (pFirstDiffOld < pLastDiffOld) && - (pFirstDiffNew < pLastDiffNew)) + while ((pFirstDiffOld < pLastDiffOld) && (pFirstDiffNew < pLastDiffNew) + && (*pFirstDiffOld == *pFirstDiffNew)) { pFirstDiffOld++; pFirstDiffNew++;