Fix off-by-one in sync v5

Simplified sliding sync specifies ranges to be inclusive while rust ranges are
exclusive.
This commit is contained in:
Jimmy Brush
2025-10-05 18:28:05 -04:00
parent 68c4f60bb3
commit 2b9563be67

View File

@@ -286,6 +286,7 @@ where
let ranges = list.ranges.clone();
for mut range in ranges {
range.0 = uint!(0);
range.1 = range.1.checked_add(uint!(1)).unwrap_or(range.1);
range.1 = range
.1
.clamp(range.0, UInt::try_from(active_rooms.len()).unwrap_or(UInt::MAX));