mirror of
https://github.com/yanyiwu/cppjieba.git
synced 2025-07-18 00:00:12 +08:00
fix crash if there is black line in dictionary
This commit is contained in:
parent
a7df45df70
commit
8a956642c3
@ -104,6 +104,8 @@ class DictTrie {
|
||||
DictUnit node_info;
|
||||
vector<string> buf;
|
||||
for (; getline(ifs, line); lineno++) {
|
||||
if (line.size() == 0)
|
||||
continue;
|
||||
buf.clear();
|
||||
split(line, buf, " ");
|
||||
if (buf.size() < 1) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user