From dfde44dc499b7c5f6f7a7613b74676283e0d53f2 Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Fri, 20 May 2011 14:43:31 +0200 Subject: [PATCH] SkipComment also skip empty lines --- common/clitkCommon.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx index b12f6f5..3c16d87 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(); } //// //------------------------------------------------------------------ -- 2.45.1