X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkCommon.cxx;h=3c16d879e7a39c055b26690b4c27676919c5a182;hb=dfde44dc499b7c5f6f7a7613b74676283e0d53f2;hp=df47f51ab943d3ed55177569165d9a8fd4c24306;hpb=164e784d773cef093f46b6aed156269fe46bf676;p=clitk.git diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx index df47f51..3c16d87 100644 --- a/common/clitkCommon.cxx +++ b/common/clitkCommon.cxx @@ -3,7 +3,7 @@ Authors belong to: - University of LYON http://www.universite-lyon.fr/ - - Léon Bérard cancer center http://oncora1.lyon.fnclcc.fr + - Léon Bérard cancer center http://www.centreleonberard.fr - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr This software is distributed WITHOUT ANY WARRANTY; without even @@ -14,7 +14,7 @@ - BSD See included LICENSE.txt file - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html -======================================================================-====*/ +===========================================================================**/ #ifndef CLITKCOMMON_CXX #define 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(); } //// //------------------------------------------------------------------