From 170c59481f0c1fe971c082340c0e884acf2668c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olivier=20Teuli=C3=A8re?= Date: Fri, 10 Sep 2010 18:36:36 +0000 Subject: [PATCH] Ignore '\r' characters when loading the word list --- dic/compdic.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dic/compdic.cpp b/dic/compdic.cpp index bd4a0f8..f34e561 100644 --- a/dic/compdic.cpp +++ b/dic/compdic.cpp @@ -151,6 +151,9 @@ void CompDic::loadWordList(const string &iFileName, vector &oWordList) { line = line.substr(3); } + // Remove potential \r + if (line[line.size() - 1] == '\r') + line = line.substr(0, line.size() - 1); // Ignore empty lines if (line == "") continue;