summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2017-04-16 09:14:39 +0200
committerJulien Nabet <serval2412@yahoo.fr>2017-04-16 10:37:00 +0200
commit22c775b05b37a89e8d64e36d1ec2fb5dfbfa5259 (patch)
treec98301c3fc75cb9fbfcfce52e4dd5199dc30050e /formula/source
parente81a35e1a86b6492a68f52ae53c41ee624981ee8 (diff)
cppcheck: arrayIndexThenCheck
Change-Id: Ie3ca646fae94ff5a06a29fc2823a1cacafc3deb1 Reviewed-on: https://gerrit.libreoffice.org/36575 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/core/api/token.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 45031ef42ad9..ac7af181046a 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -615,7 +615,7 @@ FormulaToken* FormulaTokenArray::PeekNextNoSpaces()
if( pCode && nIndex < nLen )
{
sal_uInt16 j = nIndex;
- while ( pCode[j]->GetOpCode() == ocSpaces && j < nLen )
+ while ( j < nLen && pCode[j]->GetOpCode() == ocSpaces )
j++;
if ( j < nLen )
return pCode[ j ];