From 10e12cc117f40b9ef802310fd2403e044266f4be Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 18 Nov 2013 12:35:16 +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 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; -- 2.39.2