From 9d13ca84f52f492629b64913b0819e40d7a8b6b4 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Fri, 15 Mar 2024 16:55:34 -0700 Subject: [PATCH] Fix bug spotted by hand. No test coverage there yet --- ConflictSet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 8a53930..5358115 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -464,6 +464,9 @@ inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) { inline void Node256::copyChildrenAndKeyFrom(const Node256 &other) { memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin, kNodeCopySize); + for (int i = 0; i < 256; ++i) { + children[i].child = nullptr; + } bitSet = other.bitSet; bitSet.forEachInRange( [&](int c) {