From: eap Date: Mon, 18 Nov 2013 13:21:17 +0000 (+0000) Subject: fix SIGFPE on too short EDGEs X-Git-Tag: V7_3_0a1~47 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c789cfecef7a920221bacddc77fc3fb675dd79f5;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 38b703539..2f9bdac32 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -1266,7 +1266,7 @@ bool AdaptiveAlgo::makeSegments() } // compute parameters of nodes - int nbSegFinal = int(floor(nbSegs.back()+0.5)); + int nbSegFinal = Max( 1, int(floor( nbSegs.back() + 0.5 ))); double fact = nbSegFinal / nbSegs.back(); if ( maxSegSize / fact > myHyp->GetMaxSize() ) fact = ++nbSegFinal / nbSegs.back();