mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-04-26 10:11:10 -04:00
fix(sliding-sync): ensure last index is also invalidated
Index ranges are inclusive, but our loop would stop one short. This particuarly tricky when the selective view is moved, as we didn't properly invalidate all items.
This commit is contained in:
committed by
Benjamin Kampmann
parent
58aec0d126
commit
514530c19a
@@ -1419,7 +1419,9 @@ impl SlidingSyncView {
|
||||
));
|
||||
}
|
||||
|
||||
while pos < end {
|
||||
// ranges are inclusive up to the last index. e.g. `[0, 10]`; `[0, 0]`.
|
||||
// ensure we pick them all up
|
||||
while pos <= end {
|
||||
if pos as usize >= max_len {
|
||||
break; // how does this happen?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user