0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 08:42:34 +01:00

modules/client/sync/rooms/timeline: Fix loop conditions.

This commit is contained in:
Jason Volk 2019-09-17 18:17:28 -07:00
parent 5bf60df98b
commit be2ae27af6

View file

@ -272,12 +272,15 @@ ircd::m::sync::_room_timeline_polylog_events(data &data,
++i;
}
limited = i >= limit;
if(i > 0 && !it)
limited = i > limit;
if(i > 1 && !it)
it.seek(event_idx);
if(i > 0)
for(++it; it && i > -1; ++it, --i)
if(i > 1 && it)
--i, ++it;
if(i > 0 && it)
for(++it; i > 0 && it; --i, ++it)
{
const m::event &event
{