]> Creatis software - crea.git/blobdiff - lib/creaDevManagerLib/modelCDMProject.cpp
Feature #1711 CreaDevManager application implementation
[crea.git] / lib / creaDevManagerLib / modelCDMProject.cpp
index 30203265940ccf2d3f005ce0bf01035bcc19ebbd..d26932d61504c65033393978a1ccdf5d69173be6 100644 (file)
@@ -1022,7 +1022,7 @@ bool modelCDMProject::IsPackageIncluded(const std::string& package_name)
             {
               std::getline(CMFile, line);
               while(line[0]==' ')
-                line.erase(0);
+                line.erase(0,1);
               if(line[0] != '#')
                 {
                   std::vector<std::string> lineSeg;
@@ -1053,6 +1053,9 @@ bool modelCDMProject::SetPackageInclude(const std::string& package_name, const b
           while(!CMFile.eof())
             {
               std::getline(CMFile, line);
+              if (CMFile.eof()) {
+                break;
+              }
               if(line != "")
                 {
                   std::vector<std::string> segs;