diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-06-22 19:56:15 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2022-06-23 16:14:12 +0200 |
commit | 05299b4205fa0960c3b2ed55a8c4963ee76238be (patch) | |
tree | 87f83f27d7dfeefaa259e7a7fbf5cf873b2b6ae7 | |
parent | db39e5359d7f9b4e42c6101dd75bc5e8d809ad41 (diff) |
crashtesting: assert in rtl_uString_iterateCodePoints with forum-en-32401.ods
probably since:
commit 78b7e5f76e72647e0cab662ad2c9342d4538704f
Date: Thu Nov 23 18:21:19 2017 +0100
tdf#97198 Make Calc function SEARCH work with UniCode non-BMP characters.
Change-Id: I538c034820e606ba4397f42567dd3087f14129fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136296
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index 13745246a8b2..dbffd939d53d 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -9046,12 +9046,12 @@ void ScInterpreter::ScFind() { sal_Int32 nIdx = 0; nCnt = 0; - while ( nIdx <= nPos ) + while ( nIdx < nPos ) { sStr.iterateCodePoints( &nIdx ); ++nCnt; } - PushDouble( static_cast<double>(nCnt) ); + PushDouble( static_cast<double>(nCnt + 1) ); } } } @@ -9445,12 +9445,12 @@ void ScInterpreter::ScSearch() { sal_Int32 nIdx = 0; sal_Int32 nCnt = 0; - while ( nIdx <= nPos ) + while ( nIdx < nPos ) { sStr.iterateCodePoints( &nIdx ); ++nCnt; } - PushDouble( static_cast<double>(nCnt) ); + PushDouble( static_cast<double>(nCnt + 1) ); } } } |