summaryrefslogtreecommitdiffstats
path: root/src/pinyin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pinyin.cpp')
-rw-r--r--src/pinyin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pinyin.cpp b/src/pinyin.cpp
index f4a20fe..a3fd37d 100644
--- a/src/pinyin.cpp
+++ b/src/pinyin.cpp
@@ -590,11 +590,11 @@ bool pinyin_translate_token(pinyin_instance_t * instance,
PhraseItem item;
utf16_t buffer[MAX_PHRASE_LENGTH];
- bool retval = context->m_phrase_index->get_phrase_item(token, item);
+ int retval = context->m_phrase_index->get_phrase_item(token, item);
item.get_phrase_string(buffer);
guint8 length = item.get_phrase_length();
*word = g_utf16_to_utf8(buffer, length, NULL, NULL, NULL);
- return retval;
+ return retval == ERROR_OK;
}
bool pinyin_train(pinyin_instance_t * instance){