Commit 716ee9e2 authored by Timo Teräs's avatar Timo Teräs

solver: fix zero score comparison

parent 1aa962db
...@@ -976,7 +976,7 @@ int apk_solver_solve(struct apk_database *db, ...@@ -976,7 +976,7 @@ int apk_solver_solve(struct apk_database *db,
if (cmpscore(&ss->score, &ss->best_score) < 0) if (cmpscore(&ss->score, &ss->best_score) < 0)
record_solution(ss); 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 /* found solution - it is optimal because we permutate
* each preferred local option first, and permutations * each preferred local option first, and permutations
* happen in topologally sorted order. */ * happen in topologally sorted order. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment