diff --git a/Polyhedron_IO/include/CGAL/IO/OBJ_reader.h b/Polyhedron_IO/include/CGAL/IO/OBJ_reader.h index 33c686dd471..2fa9404e4b0 100644 --- a/Polyhedron_IO/include/CGAL/IO/OBJ_reader.h +++ b/Polyhedron_IO/include/CGAL/IO/OBJ_reader.h @@ -48,7 +48,13 @@ read_OBJ( std::istream& input, faces.push_back( std::vector() ); while(iss >> i) { - faces.back().push_back(i-1); + if(i < 1) + { + faces.back().push_back(points.size()+i);//negative indices are relative references + } + else { + faces.back().push_back(i-1); + } iss.ignore(256, ' '); } }