diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 5898ec3..33736c0 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2936,9 +2936,13 @@ void fixupMaxVersion(Node *node, WriteContext *writeContext) { break; case Type_Node3: { auto *self3 = static_cast(node); - max = std::max(max, - horizontalMaxUpTo16(self3->childMaxVersion, - writeContext->zero, self3->numChildren)); + assume(1 <= self3->numChildren); + assume(self3->numChildren <= 3); + InternalVersionT m = self3->childMaxVersion[0]; + for (int i = 1; i < self3->numChildren; ++i) { + m = std::max(m, self3->childMaxVersion[i]); + } + max = std::max(max, m); } break; case Type_Node16: { auto *self16 = static_cast(node);