From 716ee9e223fd3a2ab73d7ab544c6276e43417e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Tue, 1 Nov 2011 14:44:39 +0200 Subject: [PATCH] solver: fix zero score comparison --- src/solver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/solver.c b/src/solver.c index ff3c495..fbb0dec 100644 --- a/src/solver.c +++ b/src/solver.c @@ -976,7 +976,7 @@ int apk_solver_solve(struct apk_database *db, if (cmpscore(&ss->score, &ss->best_score) < 0) record_solution(ss); - if (cmpscore(&zero_score, &ss->score) <= 0) { + if (cmpscore(&zero_score, &ss->score) >= 0) { /* found solution - it is optimal because we permutate * each preferred local option first, and permutations * happen in topologally sorted order. */