summaryrefslogtreecommitdiffstats
path: root/src/PYPTradCandidates.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/PYPTradCandidates.cc')
-rw-r--r--src/PYPTradCandidates.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/PYPTradCandidates.cc b/src/PYPTradCandidates.cc
index fd221ab..6442783 100644
--- a/src/PYPTradCandidates.cc
+++ b/src/PYPTradCandidates.cc
@@ -32,6 +32,7 @@ TraditionalCandidates::processCandidates (std::vector<EnhancedCandidate> & candi
{
m_candidates.clear ();
+ String trad;
for (guint i = 0; i < candidates.size (); i++) {
EnhancedCandidate & enhanced = candidates[i];
@@ -39,7 +40,8 @@ TraditionalCandidates::processCandidates (std::vector<EnhancedCandidate> & candi
enhanced.m_candidate_type = CANDIDATE_TRADITIONAL_CHINESE;
enhanced.m_candidate_id = i;
- String trad;
+
+ trad.truncate (0);
SimpTradConverter::simpToTrad (enhanced.m_display_string.c_str (), trad);
enhanced.m_display_string = trad;
}