From: Vivien Delmon <vivien.delmon@creatis.insa-lyon.fr>
Date: Fri, 20 May 2011 12:43:31 +0000 (+0200)
Subject: SkipComment also skip empty lines
X-Git-Tag: v1.3.0~351
X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=dfde44dc499b7c5f6f7a7613b74676283e0d53f2;p=clitk.git

SkipComment also skip empty lines
---

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();
 } ////
 //------------------------------------------------------------------