From 65494d1d325294deb4f0abea0c18462b9f29b5e7 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Tue, 24 May 2016 16:45:59 +0800 Subject: fixes some typos --- src/storage/phonetic_key_matrix.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp index bd6c561..a1623d5 100644 --- a/src/storage/phonetic_key_matrix.cpp +++ b/src/storage/phonetic_key_matrix.cpp @@ -92,14 +92,15 @@ bool fuzzy_syllable_step(pinyin_option_t options, const ChewingKeyRest key_rest = g_array_index(key_rests, ChewingKeyRest, i); -#define MATCH(AMBIGUITY, ORIGIN, ANOTHER) do { \ - if (options & AMBIGUITY) { \ - if (ORIGIN == key.m_initial) { \ - ChewingKey newkey = key; \ - newkey.m_initial = ANOTHER; \ - matrix->append(index, newkey, key_rest); \ - } \ - } \ +#define MATCH(AMBIGUITY, ORIGIN, ANOTHER) do { \ + if (options & AMBIGUITY) { \ + if (ORIGIN == key.m_initial) { \ + ChewingKey newkey = key; \ + newkey.m_initial = ANOTHER; \ + if (0 != newkey.get_table_index()) \ + matrix->append(index, newkey, key_rest); \ + } \ + } \ } while (0) @@ -241,7 +242,7 @@ int search_matrix_recur(GArray * cached_keys, g_array_set_size(cached_keys, cached_keys->len - 1); } - return true; + return result; } int search_matrix(FacadeChewingTable2 * table, -- cgit