diff --git a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h index d4dbf04e3f3..f20a4aafcfb 100644 --- a/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h +++ b/SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h @@ -599,6 +599,11 @@ bool build_triangulation_from_file(std::istream& is, std::string line; while(std::getline(is, line) && line != "End") { + // remove trailing whitespace, in particular a possible '\r' from Windows + // end-of-line encoding + if(std::isspace(line.back())) { + line.pop_back(); + } if (line.size() > 0 && line.at(0) == '#' && line.find("CGAL::Mesh_complex_3_in_triangulation_3") != std::string::npos) {