diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 495da63..b05d105 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -766,6 +766,8 @@ private: int getNodeIndex(Node3 *self, uint8_t index) { Node3 *n = (Node3 *)self; + assume(n->numChildren >= 1); + assume(n->numChildren <= 3); for (int i = 0; i < n->numChildren; ++i) { if (n->index[i] == index) { return i; @@ -1070,6 +1072,8 @@ ChildAndMaxVersion getChildAndMaxVersion(Node *self, uint8_t index) { Node *getChildGeq(Node0 *, int) { return nullptr; } Node *getChildGeq(Node3 *n, int child) { + assume(n->numChildren >= 1); + assume(n->numChildren <= 3); for (int i = 0; i < n->numChildren; ++i) { if (n->index[i] >= child) { return n->children[i];