diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-07-19 09:24:53 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-07-19 10:19:50 +0200 |
commit | f9b747f35bb969c4ac8a2ca51f66f204f61615c5 (patch) | |
tree | a5d0dd8321be34af9be980dce88d0ec9e025b975 /cui/source | |
parent | fac9dfa19b3853e4b1b6ec62baf1645a8b1194c9 (diff) |
nIdx is guaranteed to be non-negative here
Change-Id: I692f24a923075c52e260b635a6ca235f89410e3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137215
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optlingu.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index be2b891eb9ef..8f6d6a70b901 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -22,6 +22,7 @@ #include <vcl/weld.hxx> #include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/mslangid.hxx> +#include <o3tl/safeint.hxx> #include <officecfg/Office/Security.hxx> #include <unotools/lingucfg.hxx> #include <unotools/linguprops.hxx> @@ -414,7 +415,7 @@ Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( LanguageType nLang, if (pTable->count( nLang )) aRes = (*pTable)[ nLang ]; // add configured services sal_Int32 nIdx = aRes.getLength(); - DBG_ASSERT( static_cast<sal_Int32>(nDisplayServices) >= nIdx, "size mismatch" ); + DBG_ASSERT( nDisplayServices >= o3tl::make_unsigned(nIdx), "size mismatch" ); aRes.realloc( nDisplayServices ); OUString *pRes = aRes.getArray(); |