[Libreoffice-commits] core.git: sc/source

Julien Nabet serval2412 at yahoo.fr
Sun Mar 18 20:11:07 UTC 2018


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

New commits:
commit b37f81f298a23d477cb6b1e9d8f28b31b8482194
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sun Mar 18 17:58:07 2018 +0100

    cppcheck: arrayIndexThenCheck
    
    Change-Id: If30664066e3f3f99c02244e248e72406380069aa
    Reviewed-on: https://gerrit.libreoffice.org/51513
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index db91105fcf10..b66a27706a68 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -3567,7 +3567,7 @@ void ScInterpreter::ScModalValue_MS()
                 nMaxIndex = i - 1;
                 nCount = 1;
             }
-            while ( nOldVal == aArray[ i ] && i < nSize - 1 )
+            while ( (i < (nSize - 1)) && (nOldVal == aArray[ i ]) )
                 i++;
             if ( ( nSize - i ) > nMax )
             {


More information about the Libreoffice-commits mailing list