summaryrefslogtreecommitdiffstats
path: root/src/storage
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2016-05-25 11:00:08 +0800
committerPeng Wu <alexepico@gmail.com>2016-05-25 11:00:08 +0800
commitb4338a3ea4ff49a2b37887ab2d27c5f6aaba86a9 (patch)
tree8804769e770183e6f096ec6561e9a4d53d4e51ad /src/storage
parente2f610a6102f91428e42288e71447a015fd3472b (diff)
downloadlibpinyin-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.cpp7
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);
}