diff --git a/src/treekem.cpp b/src/treekem.cpp index 53aeea1c..b9cefa00 100644 --- a/src/treekem.cpp +++ b/src/treekem.cpp @@ -906,6 +906,7 @@ TreeKEMPublicKey::parent_hashes( // excluding root, including leaf auto from_node = NodeIndex(from); auto dp = fdp; + auto [last, _res_last] = dp.back(); dp.pop_back(); dp.insert(dp.begin(), { from_node, {} }); @@ -914,7 +915,6 @@ TreeKEMPublicKey::parent_hashes( } // Parent hash for all the parents, starting from the root - auto last = NodeIndex::root(size); auto last_hash = bytes{}; auto ph = std::vector(dp.size()); for (int i = static_cast(dp.size()) - 1; i >= 0; i--) {