summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/core/tool/rangeutl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx
index 9e2ce6b947ba..10fdf137765a 100644
--- a/sc/source/core/tool/rangeutl.cxx
+++ b/sc/source/core/tool/rangeutl.cxx
@@ -396,7 +396,7 @@ void ScRangeStringConverter::GetTokenByOffset(
sal_Unicode cQuote)
{
sal_Int32 nLength = rString.getLength();
- if( nOffset >= nLength )
+ if( nOffset == -1 || nOffset >= nLength )
{
rToken = OUString();
nOffset = -1;