diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-01-18 16:21:38 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-01-18 16:21:38 +0200 |
commit | b960759daa5cdc6e7fa04126bc501480fefbdf86 (patch) | |
tree | d4eb1400fc631551ac2f17d0d1d6ece042c37cfb /src | |
parent | cb15b31b7929acd6acfd06e24038b2914c7cfac5 (diff) | |
download | apk-tools-b960759daa5cdc6e7fa04126bc501480fefbdf86.tar.gz apk-tools-b960759daa5cdc6e7fa04126bc501480fefbdf86.tar.bz2 apk-tools-b960759daa5cdc6e7fa04126bc501480fefbdf86.tar.xz apk-tools-b960759daa5cdc6e7fa04126bc501480fefbdf86.zip |
solver: fix reset of last_touched to zero
Diffstat (limited to 'src')
-rw-r--r-- | src/solver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/solver.c b/src/solver.c index d87b1f0..29ee8ea 100644 --- a/src/solver.c +++ b/src/solver.c @@ -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; } |