diff options
-rw-r--r-- | i18npool/source/breakiterator/breakiterator_cjk.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index de33d122276a..5367b975e10c 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -116,7 +116,8 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak( } // Prevent cutting Korean words in the middle. - if ( nOldStartPos == nStartPos && isHangul( Text[nStartPos] ) ) + if (nOldStartPos == nStartPos && nStartPos < Text.getLength() + && isHangul(Text[nStartPos])) { while ( nStartPos >= 0 && isHangul( Text[nStartPos] ) ) --nStartPos; |