X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkCommon.cxx;h=785b0fd2c021ad087dd500a68ba0d03a60481b65;hb=4ec79c878958e58d421b7c71b2c75053944982ef;hp=b12f6f5d4b64eb17add326e8ae6dfd69e26d2c2d;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx index b12f6f5..785b0fd 100644 --- a/common/clitkCommon.cxx +++ b/common/clitkCommon.cxx @@ -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(); } //// //------------------------------------------------------------------