From 1227aa421b394e8a149d05f23149fd973208d84c Mon Sep 17 00:00:00 2001 From: akl Date: Tue, 28 May 2013 08:52:35 +0000 Subject: [PATCH] Fix of 0022218: EDF 2638 SMESH: Issue when importing UNV file: read the whole line instead of chars set. --- src/DriverUNV/UNV_Utilities.hxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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; } }; -- 2.39.2