summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/breakiterator/breakiterator_th.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx
index 2e34af376155..82d7b53665e0 100644
--- a/i18npool/source/breakiterator/breakiterator_th.cxx
+++ b/i18npool/source/breakiterator/breakiterator_th.cxx
@@ -119,7 +119,8 @@ void SAL_CALL BreakIterator_th::makeIndex(const OUString& Text, sal_Int32 nStart
// reset nextCell for new Text
memset(nextCellIndex, 0, cellIndexSize * sizeof(sal_Int32));
}
- else if (nextCellIndex[nStartPos] > 0 || ! is_Thai(Text[nStartPos]))
+ else if (nStartPos >= Text.getLength() || nextCellIndex[nStartPos] > 0
+ || !is_Thai(Text[nStartPos]))
return;
const sal_Unicode* str = cachedText.getStr();