summaryrefslogtreecommitdiff
path: root/scaddins/source/pricing
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2022-08-02 19:09:03 +0200
committerEike Rathke <erack@redhat.com>2022-08-02 20:22:47 +0200
commitdac843c4dc0407430d5a7441fd80940a99a4d8f8 (patch)
treedbdd1ecef0175536d06367e171bdb7cd4f76cdac /scaddins/source/pricing
parent562b67b78783e578dea91669dbb7770d3249d1d8 (diff)
Use nNumOfLoc instead of sizeof(pLang)
... which is count*sizeof(char*), but luckily this private function was never used with out-of-bounds values. Change-Id: Ief3b3de614ca0df00c424f7caabf70e029ea7266 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137703 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins
Diffstat (limited to 'scaddins/source/pricing')
-rw-r--r--scaddins/source/pricing/pricing.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/scaddins/source/pricing/pricing.cxx b/scaddins/source/pricing/pricing.cxx
index 3961603bc04b..8652defb3ac0 100644
--- a/scaddins/source/pricing/pricing.cxx
+++ b/scaddins/source/pricing/pricing.cxx
@@ -125,7 +125,7 @@ const lang::Locale& ScaPricingAddIn::GetLocale( sal_uInt32 nIndex )
if( !pDefLocales )
InitDefLocales();
- return (nIndex < sizeof( pLang )) ? pDefLocales[ nIndex ] : aFuncLoc;
+ return (nIndex < nNumOfLoc) ? pDefLocales[ nIndex ] : aFuncLoc;
}
void ScaPricingAddIn::InitData()