]> Creatis software - bbtk.git/commitdiff
#3497 Bug in std VectorFilterString
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 16 Mar 2023 10:11:05 +0000 (11:11 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 16 Mar 2023 10:11:05 +0000 (11:11 +0100)
packages/std/src/bbstdVectorFilterString.cxx

index d4a9c9d0d0c49b11d136670efc1493ccf0914ecf..350c845447159672ca955475dd9462cd12c19d8e 100644 (file)
@@ -365,10 +365,10 @@ void VectorFilterString::EraseDuplicateLines()
             {
                 printf("EED VectorFilterString::Process WARNING! vectors are not of the same size.\n");
             } else {
-                int iLine;
-                int ipLstvec2;
-                bool okLine;
-                int size=0;
+                int     iLine;
+                int     ipLstvec2;
+                bool    okLine;
+                int     size = 0;
                 if (bbGetInputType()==8) { size = pLstVec.size(); }
                 if (bbGetInputType()==9) { size = 1;              }
                 for (iLine=1 ; iLine < (*pLstVec[0]).size() ; iLine++ )
@@ -382,7 +382,7 @@ void VectorFilterString::EraseDuplicateLines()
                         tmp2=(*pLstVec[ipLstvec2])[iLine-1];
                         if ( tmp1.compare(tmp2)!=0 )  { okLine=true; }
                     } // for ipLstVec2
-                    if ( (okLine==true) || (iLine==0) )
+                    if ( (okLine==true) || (iLine==1) )
                     {
                         for (ipLstvec2=0 ; ipLstvec2<pLstVec.size() ; ipLstvec2++)
                         {