Salome HOME
Fix of 0022218: EDF 2638 SMESH: Issue when importing UNV file:
authorakl <akl@opencascade.com>
Tue, 28 May 2013 08:52:35 +0000 (08:52 +0000)
committerakl <akl@opencascade.com>
Tue, 28 May 2013 08:52:35 +0000 (08:52 +0000)
read the whole line instead of chars set.

src/DriverUNV/UNV_Utilities.hxx

index 50a53a75f16112200b24896e4420aff7dac71c16..1db6d2bb9c68e866fc3a52a51947a1ceb4f734e4 100644 (file)
@@ -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;
   }
 };