]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
fix SIGFPE on too short EDGEs
authoreap <eap@opencascade.com>
Mon, 18 Nov 2013 13:21:17 +0000 (13:21 +0000)
committereap <eap@opencascade.com>
Mon, 18 Nov 2013 13:21:17 +0000 (13:21 +0000)
src/StdMeshers/StdMeshers_Adaptive1D.cxx

index 38b703539bc074e4fa5b2e4b8228e5b54430f64b..2f9bdac328b3921a92831150475c5822a35eb2ec 100644 (file)
@@ -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();