Skip to content

Commit 8a7613b

Browse files
committed
improve 2
1 parent 9ad574d commit 8a7613b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dictionary.cpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,10 @@ BOOL XgUpdateDictionaryUsingClues(HWND hwnd, const XGStringW& dict_name)
638638

639639
auto it = word_to_hint_map.find(strNormalized);
640640
if (it != word_to_hint_map.end()) {
641-
fields[1] = it->second;
641+
if (fields.size() >= 2)
642+
fields[1] = it->second;
643+
else
644+
fields.push_back(it->second);
642645
word_to_hint_map.erase(it);
643646
auto strNew = mstr_join(fields, L"\t");
644647
if (line != strNew) {

0 commit comments

Comments
 (0)