diff options
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index 4235027feeca..f969e7f82814 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -347,7 +347,7 @@ sal_Int32 SAL_CALL BreakIteratorImpl::nextScript( const OUString& Text, sal_Int3 if (nStartPos < 0) nStartPos = 0; sal_Int32 strLen = Text.getLength(); - if (nStartPos > strLen) + if (nStartPos >= strLen) return -1; sal_Int16 numberOfChange = (ScriptType == getScriptClass(Text.iterateCodePoints(&nStartPos, 0))) ? 2 : 1; |