From 17f0730e517d667e597eb18588af38e80059c9fb Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Wed, 22 Feb 2012 16:19:05 +0100 Subject: [PATCH] Levels are always > 0, negative level was just a hack in the C implementation Fixes #243 --- src/Composer/DependencyResolver/Solver.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Composer/DependencyResolver/Solver.php b/src/Composer/DependencyResolver/Solver.php index ab85c78c2..fd39faed3 100644 --- a/src/Composer/DependencyResolver/Solver.php +++ b/src/Composer/DependencyResolver/Solver.php @@ -1393,7 +1393,7 @@ class Solver // if there are multiple candidates, then branch if (count($literals)) { - $this->branches[] = array($literals, -$level); + $this->branches[] = array($literals, $level); } return $this->setPropagateLearn($level, $selectedLiteral, $disableRules, $rule); @@ -1996,7 +1996,7 @@ class Solver $level = $lastLevel; $this->revert($level); - $why = $this->decisionQueueWhy[count($this->decisionQueueWhy)]; + $why = $this->decisionQueueWhy[count($this->decisionQueueWhy) - 1]; $oLevel = $level; $level = $this->setPropagateLearn($level, $lastLiteral, $disableRules, $why);