diff --git a/lib/settings.cpp b/lib/settings.cpp index 9a98ffaad..97d979946 100644 --- a/lib/settings.cpp +++ b/lib/settings.cpp @@ -45,8 +45,17 @@ Settings::Settings() bool Settings::Suppressions::parseFile(std::istream &istr) { + // Change '\r' to '\n' in the istr + std::string filedata; std::string line; - while (getline(istr, line)) + while (std::getline(istr, line)) + filedata += line + "\n"; + while (filedata.find("\r") != std::string::npos) + filedata[filedata.find("\r")] = '\n'; + + // Parse filedata.. + std::istringstream istr2(filedata); + while (std::getline(istr2, line)) { // Skip empty lines if (line.empty())