From 11dfb3b72c7128e05e8608ff501d06b80a2788c1 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Mon, 26 Dec 2011 14:56:09 +0800 Subject: fixes pinyin_translate_token --- src/pinyin.cpp | 4 ++-- 1 file 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){ -- cgit