diff options
author | Peng Wu <alexepico@gmail.com> | 2016-05-25 11:00:08 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2016-05-25 11:00:08 +0800 |
commit | b4338a3ea4ff49a2b37887ab2d27c5f6aaba86a9 (patch) | |
tree | 8804769e770183e6f096ec6561e9a4d53d4e51ad /src/storage | |
parent | e2f610a6102f91428e42288e71447a015fd3472b (diff) | |
download | libpinyin-b4338a3ea4ff49a2b37887ab2d27c5f6aaba86a9.tar.gz libpinyin-b4338a3ea4ff49a2b37887ab2d27c5f6aaba86a9.tar.xz libpinyin-b4338a3ea4ff49a2b37887ab2d27c5f6aaba86a9.zip |
fixes search_matrix function
Diffstat (limited to 'src/storage')
-rw-r--r-- | src/storage/phonetic_key_matrix.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/storage/phonetic_key_matrix.cpp b/src/storage/phonetic_key_matrix.cpp index a1623d5..93a69e7 100644 --- a/src/storage/phonetic_key_matrix.cpp +++ b/src/storage/phonetic_key_matrix.cpp @@ -207,6 +207,13 @@ int search_matrix_recur(GArray * cached_keys, if (cached_keys->len > MAX_PHRASE_LENGTH) return SEARCH_NONE; + /* only "'" here. */ + if (0 == cached_keys->len) + return SEARCH_CONTINUED; + +#if 0 + printf("search table:%d\n", cached_keys->len); +#endif return table->search(cached_keys->len, (ChewingKey *)cached_keys->data, ranges); } |