diff --git a/ConflictSet.cpp b/ConflictSet.cpp index d1fb8e8..420a2a0 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1147,21 +1147,27 @@ ChildAndMaxVersion getChildAndMaxVersion(Node0 *, uint8_t) { return {}; } ChildAndMaxVersion getChildAndMaxVersion(Node3 *self, uint8_t index) { int i = getNodeIndex(self, index); if (i < 0) { - return {}; + ChildAndMaxVersion result; + result.child = nullptr; + return result; } return {self->children[i], self->childMaxVersion[i]}; } ChildAndMaxVersion getChildAndMaxVersion(Node16 *self, uint8_t index) { int i = getNodeIndex(self, index); if (i < 0) { - return {}; + ChildAndMaxVersion result; + result.child = nullptr; + return result; } return {self->children[i], self->childMaxVersion[i]}; } ChildAndMaxVersion getChildAndMaxVersion(Node48 *self, uint8_t index) { int i = self->index[index]; if (i < 0) { - return {}; + ChildAndMaxVersion result; + result.child = nullptr; + return result; } return {self->children[i], self->childMaxVersion[i]}; }