0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-28 06:48:20 +02:00

modules/console: Fix off by one for room events output limit param.

This commit is contained in:
Jason Volk 2020-11-03 10:51:32 -08:00
parent 26ca956e5b
commit 38e0021fe6

View file

@ -10698,7 +10698,7 @@ console_cmd__room__events(opt &out, const string_view &line)
room, uint64_t(depth >= 0? depth : -1)
};
for(; it && limit >= 0; order == 'b'? --it : ++it, --limit)
for(; it && limit > 0; order == 'b'? --it : ++it, --limit)
out << std::left << std::setw(10) << it.event_idx() << " "
<< pretty_oneline(*it)
<< std::endl;