mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/client/sync/rooms/timeline: Fix loop conditions.
This commit is contained in:
parent
5bf60df98b
commit
be2ae27af6
1 changed files with 7 additions and 4 deletions
|
@ -272,12 +272,15 @@ ircd::m::sync::_room_timeline_polylog_events(data &data,
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
limited = i >= limit;
|
limited = i > limit;
|
||||||
if(i > 0 && !it)
|
if(i > 1 && !it)
|
||||||
it.seek(event_idx);
|
it.seek(event_idx);
|
||||||
|
|
||||||
if(i > 0)
|
if(i > 1 && it)
|
||||||
for(++it; it && i > -1; ++it, --i)
|
--i, ++it;
|
||||||
|
|
||||||
|
if(i > 0 && it)
|
||||||
|
for(++it; i > 0 && it; --i, ++it)
|
||||||
{
|
{
|
||||||
const m::event &event
|
const m::event &event
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue