From 6fb0d50ded3f1666159bb713d381ab269d11e21d Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 19 May 2016 16:45:44 +0800 Subject: fixes a typo --- src/storage/phonetic_key_matrix.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp index 61554fb..bd48f38 100644 --- a/src/storage/phonetic_key_matrix.cpp +++ b/src/storage/phonetic_key_matrix.cpp @@ -250,13 +250,19 @@ int search_matrix(FacadeChewingTable2 * table, GArray * key_rests = g_array_new(TRUE, TRUE, sizeof(ChewingKeyRest)); matrix->get_items(start, keys, key_rests); - const size_t len = keys->len; + const size_t start_len = keys->len; + + matrix->get_items(end, keys, key_rests); + const size_t end_len = keys->len; g_array_free(keys, TRUE); g_array_free(key_rests, TRUE); + if (0 == start_len) + return SEARCH_NONE; + /* for empty column simply return SEARCH_CONTINUED. */ - if (0 == len) + if (0 == end_len) return SEARCH_CONTINUED; GArray * cached_keys = g_array_new(TRUE, TRUE, sizeof(ChewingKey)); -- cgit