From 885647fe4cf43a26c20e114691deb685b2be1cf9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 19 Jan 2024 15:17:04 +0100 Subject: [PATCH] fix for when the line is empty --- SMDS_3/include/CGAL/SMDS_3/tet_soup_to_c3t3.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 f20a4aafcfb..7b250380193 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 @@ -601,7 +601,7 @@ bool build_triangulation_from_file(std::istream& is, { // remove trailing whitespace, in particular a possible '\r' from Windows // end-of-line encoding - if(std::isspace(line.back())) { + if(!line.empty() && std::isspace(line.back())) { line.pop_back(); } if (line.size() > 0 && line.at(0) == '#' &&