]> Creatis software - bbtk.git/commitdiff
Bug #1761
authorEsteban Correa <Esteban.Correa@creatis.insa-lyon.fr>
Wed, 14 Nov 2012 12:48:07 +0000 (12:48 +0000)
committerEsteban Correa <Esteban.Correa@creatis.insa-lyon.fr>
Wed, 14 Nov 2012 12:48:07 +0000 (12:48 +0000)
ReadColumnsStrings duplicating last element

Fixed adding a space at fscanf!

packages/std/src/bbstdReadColumnsString.cxx

index f6cd0a7bc6d45465c00bbb88743a23223051c1a3..e6e5d018f0f6bb2949759418a17d869c6fcfa526 100644 (file)
@@ -38,9 +38,12 @@ void ReadColumnsString::Process()
                {
                        for( i=0 ;  i<bbGetInputDimension() ; i++)
                        {
-                               fscanf(ff1,"%s",tmpValue);
+                               //EED Big careful not meesing the space caracter!!!
+//                             fscanf(ff1,"%s",tmpValue);    // this line is not working in linux!
+                               fscanf(ff1,"%s ",tmpValue);
                                vecData=tlst[i];
                                vecData->push_back( tmpValue );
+                                       printf("*******************************************EC ReadColumnsString::Last Value: %s \n",tmpValue);
                        }       
                        numberOfLines++;                        
                }