Fix use-of-uninit in eraseBetween (Node256)

This commit is contained in:
2024-08-14 15:25:10 -07:00
parent baf64520d6
commit 1e34951a77

View File

@@ -1874,7 +1874,7 @@ void eraseBetween(Node **inTree, Node256 *n, int begin, int end,
const unsigned shiftAmount = begin;
auto inBounds = [&](unsigned c) { return c - shiftAmount < shiftUpperBound; };
n->numChildren = 0;
BitSet newBitSet;
BitSet newBitSet{};
n->bitSet.forEachSet([&](int i) {
if (inBounds(i)) {
eraseTree(std::exchange(n->children[i], nullptr), tls);