]> Creatis software - bbtk.git/blobdiff - packages/std/src/bbstdReadColumnsDouble.cxx
bbstdReadColumnsDouble adds an extra line at the end of the read file.
[bbtk.git] / packages / std / src / bbstdReadColumnsDouble.cxx
index 95a8576a432aa975795da5efac6e959deaf3db15..c74a39fd1ff6e68a03059648200135ad841ce4b2 100644 (file)
@@ -56,13 +56,16 @@ void ReadColumnsDouble::Process()
        FILE *ff1 = fopen( bbGetInputFileName().c_str() , "r+" );
        if (ff1!=NULL)
        {
+                if (!feof(ff1))
+                        fscanf(ff1,"%s",tmpValue);
+
                while (!feof(ff1))
                {
                        for( i=0 ;  i<bbGetInputDimension() ; i++)
                        {
-                               fscanf(ff1,"%s",tmpValue);
                                vecData=tlst[i];
                                vecData->push_back( atof(tmpValue) );
+                                fscanf(ff1,"%s",tmpValue);
                        }       
                        numberOfLines++;                        
                }