]> Creatis software - clitk.git/commitdiff
SkipComment also skip empty lines
authorVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 20 May 2011 12:43:31 +0000 (14:43 +0200)
committerVivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Fri, 20 May 2011 12:43:31 +0000 (14:43 +0200)
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();
 } ////
 //------------------------------------------------------------------