Fix bug spotted by hand. No test coverage there yet

This commit is contained in:
2024-03-15 16:55:34 -07:00
parent a79436ee9b
commit 9d13ca84f5

View File

@@ -464,6 +464,9 @@ inline void Node256::copyChildrenAndKeyFrom(const Node48 &other) {
inline void Node256::copyChildrenAndKeyFrom(const Node256 &other) { inline void Node256::copyChildrenAndKeyFrom(const Node256 &other) {
memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin, memcpy((char *)this + kNodeCopyBegin, (char *)&other + kNodeCopyBegin,
kNodeCopySize); kNodeCopySize);
for (int i = 0; i < 256; ++i) {
children[i].child = nullptr;
}
bitSet = other.bitSet; bitSet = other.bitSet;
bitSet.forEachInRange( bitSet.forEachInRange(
[&](int c) { [&](int c) {