sc/source/core/tool/appoptio.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85ee924f83173d4addd6ed22d8756fe6d66ccaba
Author: Stephan Bergmann <sberg...@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 <c...@libreoffice.org>
    Reviewed-by: Stephan Bergmann <sberg...@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]);
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to