From 5183b6fd34e4a9a5443406e801ec70139e68c471 Mon Sep 17 00:00:00 2001 From: khramshinr Date: Tue, 9 Apr 2024 19:52:47 +0800 Subject: configdep: T6206 fix marker for last element of delete priority queues related task: T5660: add marker for last element of priority queues --- src/commit/commit-algorithm.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp index ab7eee6..a84fdf5 100644 --- a/src/commit/commit-algorithm.cpp +++ b/src/commit/commit-algorithm.cpp @@ -1308,6 +1308,8 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2) TRACE_INIT("Processing the Priority Queue"); clear_last(); int num = pq.size(); + // decrease by one because we have one root element + --num; while (!dpq.empty()) { PrioNode *p = dpq.top(); set_if_last(num+dpq.size()); -- cgit v1.2.3