diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 18:35:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-05-11 21:05:54 +0100 |
commit | 9ca2e0abe7ed6c60682cadec836789dace169eb4 (patch) | |
tree | c9899d3099752ed4013cbb5a3a1d69daa73a7c84 /svl | |
parent | ee636db4dd742e14c052a0974d3bf593f3181309 (diff) |
coverity#982701 Improper use of negative value
Change-Id: I3c932e8386d994450f05a876b6ad76ba141bd4e9
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 5d5f9e3dfaa4..575c6ea93e6d 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -5439,6 +5439,10 @@ sal_Int32 SvNumberformat::GetQuoteEnd( const OUString& rStr, sal_Int32 nPos, sal_Unicode cQuote, sal_Unicode cEscIn, sal_Unicode cEscOut ) { + if ( nPos < 0 ) + { + return -1; + } sal_Int32 nLen = rStr.getLength(); if ( nPos >= nLen ) { |