Fix: The top left key is a proximity of nonexistent keys.

Bug: 13315755
Change-Id: I39e905b6ddfc8d3510c408a3bea853390a75d088
main
Keisuke Kuroyanagi 2014-03-05 19:06:18 +09:00
parent 61c726f591
commit 6501255111
1 changed files with 3 additions and 0 deletions

View File

@ -164,6 +164,9 @@ class ProximityInfoUtils {
const int gridWidth, const int mostCommonKeyWidth, const int keyCount,
const int x, const int y, const int primaryKey, const char *const localeStr,
const hash_map_compat<int, int> *const codeToKeyMap, int *proximities) {
if (x == NOT_A_COORDINATE || y == NOT_A_COORDINATE) {
return;
}
const int mostCommonKeyWidthSquare = mostCommonKeyWidth * mostCommonKeyWidth;
int insertPos = 0;
proximities[insertPos++] = primaryKey;