diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-10-29 07:50:49 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-10-29 07:50:49 +0100 |
commit | a3f0eab294df3a48d497c2b985ec9655f2da2357 (patch) | |
tree | 5c3ea0a6a605b6c7da24cbc32e107032320e3e81 /i18npool | |
parent | 78f2f28e94be978786452224befb27f6f965b50b (diff) |
cppcheck: Array index is used before limits check
Change-Id: I51f7408a81a10e2c586cb05b863f20b13bb7b263
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/nativenumber/nativenumbersupplier.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 382d58c53ebd..bf2ff1100b4c 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -194,7 +194,7 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ srcStr[len++] = str[i]; } else { if (len > 0) { - if (isSeparator(str[i]) && i < nCount-1 && isNumber(str[i+1])) + if (i < nCount-1 && isSeparator(str[i]) && isNumber(str[i+1])) continue; // skip comma inside number string sal_Bool notZero = sal_False; for (sal_Int32 begin = 0, end = len % number->multiplierExponent[0]; @@ -224,11 +224,11 @@ OUString SAL_CALL AsciiToNative( const OUString& inStr, sal_Int32 startPos, sal_ len = 0; } if (i < nCount) { - if ((doDecimal = (!doDecimal && isDecimal(str[i]) && i < nCount-1 && isNumber(str[i+1]))) != sal_False) + if ((doDecimal = (!doDecimal && i < nCount-1 && isDecimal(str[i]) && isNumber(str[i+1]))) != sal_False) newStr[count] = (DecimalChar[number->number] ? DecimalChar[number->number] : str[i]); - else if (isMinus(str[i]) && i < nCount-1 && isNumber(str[i+1])) + else if (i < nCount-1 && isMinus(str[i]) && isNumber(str[i+1])) newStr[count] = (MinusChar[number->number] ? MinusChar[number->number] : str[i]); - else if (isSeparator(str[i]) && i < nCount-1 && isNumber(str[i+1])) + else if (i < nCount-1 && isSeparator(str[i]) && isNumber(str[i+1])) newStr[count] = (SeparatorChar[number->number] ? SeparatorChar[number->number] : str[i]); else newStr[count] = str[i]; |