From 8ab714ff079ac4a952b51a45715c13789587026d Mon Sep 17 00:00:00 2001 From: erg Date: Wed, 6 Feb 2008 19:22:02 +0000 Subject: [PATCH] Fix bug when maxiter=0 is used. --- lib/neatogen/neatoinit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/neatogen/neatoinit.c b/lib/neatogen/neatoinit.c index 3ddf55c0d..dd49d6dba 100644 --- a/lib/neatogen/neatoinit.c +++ b/lib/neatogen/neatoinit.c @@ -1307,7 +1307,7 @@ void neatoLayout(Agraph_t * mg, Agraph_t * g, int layoutMode, int layoutModel) MaxIter = 100 * agnnodes(g); nG = scan_graph_mode(g, layoutMode); - if (nG < 2) + if ((nG < 2) || (MaxIter <=0)) return; if (layoutMode) majorization(mg, g, nG, layoutMode, layoutModel, Ndim, MaxIter); -- 2.40.0