From ae0c8e66d01d84e36ab154faac9e7d136d25619a Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Wed, 16 Dec 2015 19:37:10 +0100 Subject: [PATCH] Bug correction on computeOffsets2 for empty arrayint. Shame on me \! --- src/MEDCoupling/MEDCouplingMemArray.cxx | 2 -- src/MEDCoupling_Swig/MEDCouplingBasicsTest.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) 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