From: akl Date: Tue, 28 May 2013 08:52:35 +0000 (+0000) Subject: Fix of 0022218: EDF 2638 SMESH: Issue when importing UNV file: X-Git-Tag: V7_3_0a1~397 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=1227aa421b394e8a149d05f23149fd973208d84c;p=modules%2Fsmesh.git Fix of 0022218: EDF 2638 SMESH: Issue when importing UNV file: read the whole line instead of chars set. --- diff --git a/src/DriverUNV/UNV_Utilities.hxx b/src/DriverUNV/UNV_Utilities.hxx index 50a53a75f..1db6d2bb9 100644 --- a/src/DriverUNV/UNV_Utilities.hxx +++ b/src/DriverUNV/UNV_Utilities.hxx @@ -128,15 +128,14 @@ namespace UNV{ */ inline std::string read_line(std::ifstream& in_stream, const bool next=true) { - char line[theMaxLineLen]; - in_stream.getline( line, theMaxLineLen ); + std::string resLine; + std::getline( in_stream, resLine ); if ( next ) - in_stream.getline( line, theMaxLineLen ); + std::getline( in_stream, resLine ); - std::string resLine = line; if ( resLine.size() > 0 && resLine[ resLine.size()-1 ] == '\r' ) resLine.resize( resLine.size()-1 ); - return line; + return resLine; } };