fix SIGFPE on too short EDGEs

This commit is contained in:
eap 2013-11-18 13:21:17 +00:00
parent 10e12cc117
commit c789cfecef

View 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();