summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svl/source/numbers/zformat.cxx4
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 )
{