aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Ridgers <[email protected]>2024-09-17 16:22:07 +0200
committerMartin Ridgers <[email protected]>2024-09-19 15:26:13 +0200
commit735371d4110b1c248fe0c5233b20450b758f3c06 (patch)
treefc70defc456cb18e8b8fb9989aaa94a14caf49d2 /src
parentReinstate member initialisation that was there originally (diff)
downloadzen-735371d4110b1c248fe0c5233b20450b758f3c06.tar.xz
zen-735371d4110b1c248fe0c5233b20450b758f3c06.zip
End was clamped to the wrong side if Count was defaulted
Diffstat (limited to 'src')
-rw-r--r--src/zenserver/projectstore/projectstore.cpp2
1 files changed, 1 insertions, 1 deletions
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<void(CbObjectView)>&& Hand
std::span<OplogEntryAddress> 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<uint32_t>(EntryPaging.Start + EntryPaging.Count, 0, Size);
EntrySpan = EntrySpan.subspan(Start, End - Start);
m_Storage->ReplayLogEntries(EntrySpan, [&](CbObjectView Op) { Handler(Op); });