cppcheck: Array index is used before limits check

Change-Id: I30154dd9504b70dc3212af3ac1d88dfc9a9d8396
This commit is contained in:
Julien Nabet
2013-11-16 10:52:45 +01:00
parent f2884fd376
commit 4ea65db333

View File

@@ -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++;