Explorar el Código

Merge pull request #492 from wucm1994/master

fix blank line error while opening OFF file

Former-commit-id: b1ebdeb552d305088c898b2073a32b3fa1efd16d
Alec Jacobson hace 8 años
padre
commit
f9775c5627
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      include/igl/readOFF.cpp

+ 1 - 1
include/igl/readOFF.cpp

@@ -67,7 +67,7 @@ IGL_INLINE bool igl::readOFF(
   while(still_comments)
   while(still_comments)
   {
   {
     fgets(line,1000,off_file);
     fgets(line,1000,off_file);
-    still_comments = line[0] == '#';
+    still_comments = (line[0] == '#' || line[0] == '\n');
   }
   }
   sscanf(line,"%d %d %d",&number_of_vertices,&number_of_faces,&number_of_edges);
   sscanf(line,"%d %d %d",&number_of_vertices,&number_of_faces,&number_of_edges);
   V.resize(number_of_vertices);
   V.resize(number_of_vertices);