]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Correction of big bug on polygons on loading process.
authorageay <ageay>
Fri, 12 Aug 2011 15:48:33 +0000 (15:48 +0000)
committerageay <ageay>
Fri, 12 Aug 2011 15:48:33 +0000 (15:48 +0000)
src/MEDLoader/MEDFileMeshElt.cxx

index 0f06d2f2277ec2dd007c69dfc9bdb028a36f3b84..f183f85ed80c69e14e85e2f3c0ffb903846d08c3 100644 (file)
@@ -149,7 +149,9 @@ void MEDFileUMeshPerType::loadPolyg(med_idt fid, const char *mName, int dt, int
   for(int i=0;i<curNbOfElem;i++,w2++)
     {
       *w1++=(int)INTERP_KERNEL::NORM_POLYGON;
-      w1=std::transform(wi,wi+(w2[1]-w2[0]),w1,std::bind2nd(std::plus<int>(),-1));
+      const int *wi2=wi+(w2[1]-w2[0]);
+      w1=std::transform(wi,wi2,w1,std::bind2nd(std::plus<int>(),-1));
+      wi=wi2;
       *w2=*w2-1+i;
     }
   *w2=*w2-1+curNbOfElem;