From: eap Date: Mon, 18 Nov 2013 12:35:16 +0000 (+0000) Subject: fix SIGFPE on too short EDGEs X-Git-Tag: V7_3_0a1~48 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=10e12cc117f40b9ef802310fd2403e044266f4be;p=modules%2Fsmesh.git fix SIGFPE on too short EDGEs --- diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx index e47018290..38b703539 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -1227,7 +1227,7 @@ bool AdaptiveAlgo::makeSegments() const double f = eData.myC3d.FirstParameter(), l = eData.myC3d.LastParameter(); const double parLen = l - f; const int nbDivSeg = 5; - int nbDiv = int ( eData.myLength / edgeMinSize * nbDivSeg ); + int nbDiv = Max( 1, int ( eData.myLength / edgeMinSize * nbDivSeg )); // compute nb of segments bool toRecompute = true;