]> Creatis software - clitk.git/blobdiff - common/clitkCommon.cxx
SkipComment also skip empty lines
[clitk.git] / common / clitkCommon.cxx
index b12f6f5d4b64eb17add326e8ae6dfd69e26d2c2d..3c16d879e7a39c055b26690b4c27676919c5a182 100644 (file)
@@ -41,7 +41,8 @@ void clitk::skipComment(std::istream & is)
     is >> c;
     if (is.eof()) return;
   }
-  is.unget();
+  if (!(is.fail()) || c != '\n')
+    is.unget();
 } ////
 //------------------------------------------------------------------