diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-09-23 15:54:26 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-09-23 17:49:10 +0200 |
commit | c79212479f42cadd39173e77acc5e6446480ff05 (patch) | |
tree | fd7744b8e1e910d2371bc4c2b96faa68f92244d4 | |
parent | 3bfed17b047422a8c4e98ab80001f3158afb227e (diff) |
Fix a misuse of two-argument std string_view rfind
...similar to 93e234c45c62af9d57041de676d888f7695ac0e8 "Fix a misuse of two-
argument std string_view rfind". This one got introduce in
15d8762dd07289447e782a3812dfd4425fe9a82b "use more string_view in cui". (And if
it wasn't for other bugs elsewhere, this code could be reached e.g. in Writer
with "Tools - Macros - Organize Macros - Basic...", in "Macro From" select "My
Macros - Standard - Module1" and in "Existing Macros in: Module 1" select
"Main", then "Assign...", and this code would have miscomputed aModule as "Main"
rather than as "Module1".)
Change-Id: Id3fd66e0bd252d79af629abbbf1e38b37679de70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140490
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | cui/source/customize/cfgutil.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 90b5592d44cc..ee9d4a3fdc61 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -1038,7 +1038,7 @@ void CuiConfigGroupListBox::SelectMacro( std::u16string_view rBasic, if ( nIdx>0 && nIdx != std::u16string_view::npos ) { // string contains at least 2 tokens - nIdx = rMacro.rfind('.', nIdx); + nIdx = rMacro.rfind('.', nIdx - 1); if (nIdx != std::u16string_view::npos) { // string contains at least 3 tokens |