Change the first character check in bigram dictionary to be case insensitive.
Bug: 6188977
Change-Id: I121c1abf245c7f8734730810c07d3351b1ec581a
diff --git a/native/src/bigram_dictionary.cpp b/native/src/bigram_dictionary.cpp
index fa69de8..3704c47 100644
--- a/native/src/bigram_dictionary.cpp
+++ b/native/src/bigram_dictionary.cpp
@@ -151,8 +151,9 @@
int *inputCodes = mInputCodes;
int maxAlt = MAX_ALTERNATIVES;
+ const unsigned short firstBaseChar = toBaseLowerCase(*word);
while (maxAlt > 0) {
- if ((unsigned int) *inputCodes == (unsigned int) *word) {
+ if (toBaseLowerCase(*inputCodes) == firstBaseChar) {
return true;
}
inputCodes++;