]> 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 b12f6f5..3c16d87 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();
 } ////
 //------------------------------------------------------------------