[Libreoffice-commits] core.git: sc/source
Stephan Bergmann
sbergman at redhat.com
Mon Jan 29 18:44:59 UTC 2018
sc/source/core/tool/appoptio.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 85ee924f83173d4addd6ed22d8756fe6d66ccaba
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Jan 29 14:21:45 2018 +0100
USHRT_MAX -> SAL_MAX_UINT16
nCount apparently must fit into sal_uInt16 for the cast further down when
passing it into ScAppOptions::SetLRUFuncList sal_uInt16 nCount parameter. (But
why the odd "nCount < SAL_MAX_UINT16" vs. "nCount <= SAL_MAX_UINT16" off-by-one?
Oh, my.)
Change-Id: I231f4af2ce2e6bf44db8db3fd9e965adfa17fecb
Reviewed-on: https://gerrit.libreoffice.org/48838
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sc/source/core/tool/appoptio.cxx b/sc/source/core/tool/appoptio.cxx
index 8023c11db3b8..0331f7a896d0 100644
--- a/sc/source/core/tool/appoptio.cxx
+++ b/sc/source/core/tool/appoptio.cxx
@@ -131,7 +131,7 @@ static void lcl_SetLastFunctions( ScAppOptions& rOpt, const Any& rValue )
if ( rValue >>= aSeq )
{
sal_Int32 nCount = aSeq.getLength();
- if ( nCount < USHRT_MAX )
+ if ( nCount < SAL_MAX_UINT16 )
{
const sal_Int32* pArray = aSeq.getConstArray();
std::unique_ptr<sal_uInt16[]> pUShorts(new sal_uInt16[nCount]);
More information about the Libreoffice-commits
mailing list