diff options
-rw-r--r-- | sc/source/core/tool/rangeutl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sc/source/core/tool/rangeutl.cxx b/sc/source/core/tool/rangeutl.cxx index 054c61f1b605..1fbf0074f3c8 100644 --- a/sc/source/core/tool/rangeutl.cxx +++ b/sc/source/core/tool/rangeutl.cxx @@ -374,7 +374,7 @@ sal_Int32 ScRangeStringConverter::IndexOf( sal_Bool bQuoted = false; sal_Bool bExitLoop = false; - while( !bExitLoop && (nIndex < nLength) ) + while( !bExitLoop && (nIndex >= 0 && nIndex < nLength) ) { sal_Unicode cCode = rString[ nIndex ]; bExitLoop = (cCode == cSearchChar) && !bQuoted; |