From: Peng Wu Date: Thu, 17 Nov 2011 10:42:30 +0000 (+0800) Subject: fixes post process in full pinyin parser2 X-Git-Tag: 0.4.91~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aba60da76a2d105b57512bcd24df5cd8f09abf63;p=platform%2Fupstream%2Flibpinyin.git fixes post process in full pinyin parser2 --- diff --git a/src/storage/pinyin_parser2.cpp b/src/storage/pinyin_parser2.cpp index c2f3d39..82141d4 100644 --- a/src/storage/pinyin_parser2.cpp +++ b/src/storage/pinyin_parser2.cpp @@ -360,6 +360,8 @@ bool FullPinyinParser2::post_process(guint32 options, break; } + + /* find the match */ if (k < G_N_ELEMENTS(resplit_table)) { /* do re-split */ item = resplit_table + k; @@ -368,11 +370,12 @@ bool FullPinyinParser2::post_process(guint32 options, /* assumes only moved one char in gen_all_resplit script. */ cur_rest->m_raw_end --; next_rest->m_raw_begin --; - /* save back tones */ - if (options & USE_TONE) { - cur_key->m_tone = cur_tone; - next_key->m_tone = next_tone; - } + } + + /* save back tones */ + if (options & USE_TONE) { + cur_key->m_tone = cur_tone; + next_key->m_tone = next_tone; } }