From c789cfecef7a920221bacddc77fc3fb675dd79f5 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 18 Nov 2013 13:21:17 +0000 Subject: [PATCH] fix SIGFPE on too short EDGEs --- src/StdMeshers/StdMeshers_Adaptive1D.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- 2.39.2