Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6e34944 authored by Gilles Debunne's avatar Gilles Debunne
Browse files

Bug 5218421. Spell check crash with Japanese characters

The word iterator returns no word in that case, and this is not
supported by TextInfo.

Change-Id: Iaf31c58638c02d3cdc7b88bc0d1201e793e84f17
parent 5837dfaf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -142,7 +142,7 @@ public class SpellChecker implements SpellCheckerSessionListener {
            final int end = editable.getSpanEnd(spellCheckSpan);

            // Do not check this word if the user is currently editing it
            if (start >= 0 && end >= 0 && (selectionEnd < start || selectionStart > end)) {
            if (start >= 0 && end > start && (selectionEnd < start || selectionStart > end)) {
                final String word = editable.subSequence(start, end).toString();
                spellCheckSpan.setSpellCheckInProgress();
                textInfos[textInfosCount++] = new TextInfo(word, mCookie, mIds[i]);