From 3367dd203fa6ed5bcd4f6bba93116a7a8f7988f1 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Sun, 21 Oct 2007 07:35:23 +0000 Subject: [PATCH] fixed mean bug in an optimization of addrule: Differ between binary rules and non-binary rules with one literal (e.g. two kernels) (fixed 5 test cases) --- src/solver.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/solver.c b/src/solver.c index 07373d1..a20b8b3 100644 --- a/src/solver.c +++ b/src/solver.c @@ -623,10 +623,13 @@ addrule(Solver *solv, Id p, Id d) n = 1; /* re-set n, was used as temp var */ } + /* check if the last added rule is exactly the same as what we're looking for. + * Differ between binary rules and non-binary rules with one literal (e.g. two kernels) */ if (r && n == 1 && r->p == p - && r->w2 == d) + && ( ( !r->d && r->w2 == d ) + || r->d == d)) { return r; } -- 2.7.4