cui/source/options/optlingu.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit f9b747f35bb969c4ac8a2ca51f66f204f61615c5 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Jul 19 09:24:53 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Jul 19 10:19:50 2022 +0200 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 <sberg...@redhat.com> 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();