diff --git a/lib/importproject.cpp b/lib/importproject.cpp index 1d8642493..085bab60f 100644 --- a/lib/importproject.cpp +++ b/lib/importproject.cpp @@ -466,15 +466,17 @@ bool ImportProject::importSln(std::istream &istr, const std::string &path, const { std::string line; - // skip magic word if (!std::getline(istr,line)) { printError("Visual Studio solution file is empty"); return false; } - if (!std::getline(istr, line) || line.find("Microsoft Visual Studio Solution File") != 0) { - printError("Visual Studio solution file header not found"); - return false; + if (line.find("Microsoft Visual Studio Solution File") != 0) { + // Skip BOM + if (!std::getline(istr, line) || line.find("Microsoft Visual Studio Solution File") != 0) { + printError("Visual Studio solution file header not found"); + return false; + } } std::map variables;