diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-29 11:28:05 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-29 13:23:54 +0000 |
commit | 9b667561c31cb61a9e71673626b0309e9c6d477b (patch) | |
tree | 1a275f54909eb372812535e3efb5c3c77fa767a2 /formula | |
parent | 8229f7557f019364565b53919419326202d788a9 (diff) |
coverity#1158192 Improper use of negative value
Change-Id: Ie5b455f3895e9ff53caf773e319d3342642b9945
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 8a855d79a92c..257de49d5595 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -500,7 +500,7 @@ sal_Int32 FormulaDlg_Impl::GetFunctionPos(sal_Int32 nPos) eOp == m_aSpecialOpCodes[sheet::FormulaMapGroupSpecialOffset::SPACES].Token.OpCode ) { const sal_Int32 n1 = aFormString.indexOf(sep, nTokPos); - const sal_Int32 n2 = aFormString.indexOf(')',nTokPos); + const sal_Int32 n2 = nTokPos < 0 ? -1 : aFormString.indexOf(')',nTokPos); sal_Int32 nXXX = nTokPos; if( n1 < n2 ) { |