fixes post process in full pinyin parser2
authorPeng Wu <alexepico@gmail.com>
Thu, 17 Nov 2011 10:42:30 +0000 (18:42 +0800)
committerPeng Wu <alexepico@gmail.com>
Thu, 17 Nov 2011 10:42:30 +0000 (18:42 +0800)
src/storage/pinyin_parser2.cpp

index c2f3d39..82141d4 100644 (file)
@@ -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;
         }
     }