Ignore empty lines in the word list, instead of throwing an exception

This commit is contained in:
Olivier Teulière 2010-06-12 15:59:07 +00:00
parent c861d37c5d
commit dd003417c0

View file

@ -151,6 +151,9 @@ void CompDic::loadWordList(const string &iFileName, vector<wstring> &oWordList)
{ {
line = line.substr(3); line = line.substr(3);
} }
// Ignore empty lines
if (line == "")
continue;
oWordList.push_back(readFromUTF8(line.data(), oWordList.push_back(readFromUTF8(line.data(),
line.size(), "loadWordList")); line.size(), "loadWordList"));
} }