diff --git a/ConflictSet.cpp b/ConflictSet.cpp index d43a829..8a53930 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -348,7 +348,8 @@ inline void Node16::copyChildrenAndKeyFrom(const Node3 &other) { memcpy(index, other.index, Node3::kMaxNodes); memcpy(children, other.children, Node3::kMaxNodes * sizeof(Child)); memcpy(partialKey(), &other + 1, partialKeyLen); - for (int i = 0; i < numChildren; ++i) { + assert(numChildren == Node3::kMaxNodes); + for (int i = 0; i < Node3::kMaxNodes; ++i) { assert(children[i].child->parent == &other); children[i].child->parent = this; }