Skip to content
Snippets Groups Projects
Commit c0c20b38 authored by Jean Chalard's avatar Jean Chalard
Browse files

Fix an OOB

The combination of I6b0262fe which removes the internal
size() > 1 test in the safety net calculation and I642a5893
which assumed DBG means there is at least one suggestion.
This change writes the test correctly.

Change-Id: Ib63bce4e163a785f408dd145c23d64cd58fa8c90
parent 30936116
No related branches found
No related tags found
No related merge requests found
......@@ -329,7 +329,7 @@ public class SuggestionsView extends RelativeLayout implements OnClickListener,
} else {
color = mColorTypedWord;
}
if (LatinImeLogger.sDBG) {
if (LatinImeLogger.sDBG && suggestedWords.size() > 1) {
// If we auto-correct, then the autocorrection is in slot 0 and the typed word
// is in slot 1.
if (index == mCenterSuggestionIndex && suggestedWords.mHasAutoCorrectionCandidate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment