From 4e829b1653e347bc171904c0f2c1e487403e3985 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 28 May 2015 13:19:20 +0800 Subject: update pinyin_guess_candidates function --- src/storage/table_info.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/storage/table_info.cpp') diff --git a/src/storage/table_info.cpp b/src/storage/table_info.cpp index 3d57e15..ff499b3 100644 --- a/src/storage/table_info.cpp +++ b/src/storage/table_info.cpp @@ -139,6 +139,10 @@ static guint8 to_index_of_default_tables(const char * str) { assert(FALSE); } +static guint8 to_index_of_addon_tables(const char * str) { + return atoi(str); +} + static gchar * to_string(const char * str) { HANDLE(NULL); @@ -230,7 +234,7 @@ bool SystemTableInfo2::load(const char * filename) { if (ADDON_TABLE == target) { tables = m_addon_tables; - index = atoi(dictstr); + index = to_index_of_addon_tables(dictstr); } assert(0 <= index && index < PHRASE_INDEX_LIBRARY_COUNT); -- cgit