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

Julien Nabet serval2412 at yahoo.fr
Sat Nov 16 01:53:26 PST 2013


 forms/source/xforms/datatypes.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4ea65db333422e58b8af1e4d5faff0849d856c37
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Nov 16 10:52:45 2013 +0100

    cppcheck: Array index is used before limits check
    
    Change-Id: I30154dd9504b70dc3212af3ac1d88dfc9a9d8396

diff --git a/forms/source/xforms/datatypes.cxx b/forms/source/xforms/datatypes.cxx
index f2fdb79..0c24ace 100644
--- a/forms/source/xforms/datatypes.cxx
+++ b/forms/source/xforms/datatypes.cxx
@@ -691,7 +691,7 @@ namespace xforms
             sal_Int32 nTotalDigits = 0;
             sal_Int32 nFractionDigits = 0;
             const sal_Unicode* pValue = rValue.getStr();
-            for( ; pValue[n] != '.' && n < nLength; n++ )
+            for( ; n < nLength && pValue[n] != '.'; n++ )
                 if( pValue[n] >= '0'
                     && pValue[n] <= '9')
                     nTotalDigits++;


More information about the Libreoffice-commits mailing list