From cafd59a301e2a958d31718427a03111f8cc1df2f Mon Sep 17 00:00:00 2001 From: alegrand Date: Tue, 24 Jun 2008 13:14:42 +0000 Subject: [PATCH] Fix the bug raised by Tchimou. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@5793 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/surf/maxmin.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/surf/maxmin.c b/src/surf/maxmin.c index dcb4b7064c..61be93462a 100644 --- a/src/surf/maxmin.c +++ b/src/surf/maxmin.c @@ -246,9 +246,10 @@ void lmm_expand_add(lmm_system_t sys, lmm_constraint_t cnst, if (var->cnsts[i].constraint == cnst) break; - if (i < var->cnsts_number) - var->cnsts[i].value += value; - else + if (i < var->cnsts_number) { + if(cnst->shared) var->cnsts[i].value += value; + else var->cnsts[i].value = MAX(var->cnsts[i].value,value); + } else lmm_expand(sys, cnst, var, value); } -- 2.20.1