From: Anthony Geay Date: Wed, 16 Jun 2021 15:11:55 +0000 (+0200) Subject: [EDF23724] : protection against intersection on a single array that can be ambigous... X-Git-Tag: V9_8_0a1~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=24cde508294b537e9a7b8d298cfee4a13656e9ef;p=tools%2Fmedcoupling.git [EDF23724] : protection against intersection on a single array that can be ambigous and so return an unexpected result --- diff --git a/src/MEDCoupling/MEDCouplingMemArray.txx b/src/MEDCoupling/MEDCouplingMemArray.txx index 1d1030307..1e8fb79f6 100755 --- a/src/MEDCoupling/MEDCouplingMemArray.txx +++ b/src/MEDCoupling/MEDCouplingMemArray.txx @@ -7082,6 +7082,9 @@ struct NotInRange throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single component allowed !"); } // + if(a.size()==1) + throw INTERP_KERNEL::Exception("DataArrayInt::BuildIntersection : only single not null element in array ! For safety reasons exception is raised !"); + // std::set r; for(typename std::vector::const_iterator it=a.begin();it!=a.end();it++) {