From: Anthony Geay Date: Wed, 16 Dec 2015 18:37:10 +0000 (+0100) Subject: Bug correction on computeOffsets2 for empty arrayint. Shame on me \! X-Git-Tag: V8_0_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ae0c8e66d01d84e36ab154faac9e7d136d25619a;p=tools%2Fmedcoupling.git Bug correction on computeOffsets2 for empty arrayint. Shame on me \! --- diff --git a/src/MEDCoupling/MEDCouplingMemArray.cxx b/src/MEDCoupling/MEDCouplingMemArray.cxx index 998ac654e..72d3a1fe3 100644 --- a/src/MEDCoupling/MEDCouplingMemArray.cxx +++ b/src/MEDCoupling/MEDCouplingMemArray.cxx @@ -10356,8 +10356,6 @@ void DataArrayInt::computeOffsets2() throw INTERP_KERNEL::Exception("DataArrayInt::computeOffsets2 : only single component allowed !"); int nbOfTuples=getNumberOfTuples(); int *ret=(int *)malloc((nbOfTuples+1)*sizeof(int)); - if(nbOfTuples==0) - return ; const int *work=getConstPointer(); ret[0]=0; for(int i=0;i