solver: fix reset of last_touched to zero

cute-signatures
Timo Teräs 2013-01-18 16:21:38 +02:00
parent cb15b31b79
commit b960759daa
1 changed files with 2 additions and 2 deletions

View File

@ -1049,7 +1049,7 @@ static void apply_constraint(struct apk_solver_state *ss, struct apk_dependency
}
if (name->ss.last_touched_decision == 0 || changed) {
dep->solver_state = name->ss.last_touched_decision;
dep->solver_state = name->ss.last_touched_decision + 1;
name->ss.last_touched_decision = ss->num_decisions;
}
@ -1122,7 +1122,7 @@ static void undo_constraint(struct apk_solver_state *ss, struct apk_dependency *
}
if (dep->solver_state) {
name->ss.last_touched_decision = dep->solver_state;
name->ss.last_touched_decision = dep->solver_state - 1;
dep->solver_state = 0;
}