diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 200a592..58049c5 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -3864,11 +3864,10 @@ PRESERVE_NONE void right_side_iter(Job *job, Context *context) { void Job::init(const ConflictSet::ReadRange *read, ConflictSet::Result *result, Node *root, int64_t oldestVersionFullPrecision) { auto begin = TrivialSpan(read->begin.p, read->begin.len); - auto end = TrivialSpan(read->end.p, read->end.len); if (read->readVersion < oldestVersionFullPrecision) [[unlikely]] { *result = ConflictSet::TooOld; continuation = complete; - } else if (end.size() == 0) { + } else if (read->end.len == 0) { this->begin = begin; this->n = root; this->readVersion = InternalVersionT(read->readVersion); @@ -3876,7 +3875,7 @@ void Job::init(const ConflictSet::ReadRange *read, ConflictSet::Result *result, continuation = check::point_read_state_machine::begin; } else { this->begin = begin; - this->end = end; + this->end = TrivialSpan(read->end.p, read->end.len); this->n = root; this->readVersion = InternalVersionT(read->readVersion); this->result = result; @@ -5046,8 +5045,8 @@ struct __attribute__((visibility("hidden"))) ConflictSet::Impl { for (int i = 0; i < count; ++i) { const auto &w = writes[i]; auto begin = TrivialSpan(w.begin.p, w.begin.len); - auto end = TrivialSpan(w.end.p, w.end.len); if (w.end.len > 0) { + auto end = TrivialSpan(w.end.p, w.end.len); addWriteRange(rootParent->children[0], begin, end, InternalVersionT(writeVersion), &writeContext); } else {