From aba60da76a2d105b57512bcd24df5cd8f09abf63 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Thu, 17 Nov 2011 18:42:30 +0800 Subject: fixes post process in full pinyin parser2 --- src/storage/pinyin_parser2.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/storage') 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; } } -- cgit