From 735371d4110b1c248fe0c5233b20450b758f3c06 Mon Sep 17 00:00:00 2001 From: Martin Ridgers Date: Tue, 17 Sep 2024 16:22:07 +0200 Subject: End was clamped to the wrong side if Count was defaulted --- src/zenserver/projectstore/projectstore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/zenserver/projectstore/projectstore.cpp b/src/zenserver/projectstore/projectstore.cpp index a970a0380..fb1385266 100644 --- a/src/zenserver/projectstore/projectstore.cpp +++ b/src/zenserver/projectstore/projectstore.cpp @@ -2067,7 +2067,7 @@ ProjectStore::Oplog::IterateOplogLocked(std::function&& Hand std::span EntrySpan = Entries; int32_t Size = int32_t(Entries.size()); int32_t Start = std::clamp(EntryPaging.Start, 0, Size); - int32_t End = std::clamp(EntryPaging.Start + EntryPaging.Count, 0, Size); + int32_t End = std::clamp(EntryPaging.Start + EntryPaging.Count, 0, Size); EntrySpan = EntrySpan.subspan(Start, End - Start); m_Storage->ReplayLogEntries(EntrySpan, [&](CbObjectView Op) { Handler(Op); }); -- cgit v1.2.3