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

modules/console: Fix loop on multiple context id's to interrupt/terminate cmds.

This commit is contained in:
Jason Volk 2020-04-05 06:14:24 -07:00
parent d91917913f
commit c76e394a8c

View file

@ -2277,9 +2277,9 @@ console_cmd__ctx__interrupt(opt &out, const string_view &line)
"id", "[id]..."
}};
bool cont{true};
size_t count(0);
for(size_t i(0); i < param.count() && cont; ++i)
cont = ctx::for_each([&](auto &ctx)
count += !ctx::for_each([&](auto &ctx)
{
if(id(ctx) == param.at<uint64_t>(i))
{
@ -2347,9 +2347,9 @@ console_cmd__ctx__term(opt &out, const string_view &line)
"id", "[id]..."
}};
bool cont {true};
size_t count(0);
for(size_t i(0); i < param.count() && cont; ++i)
cont = ctx::for_each([&](auto &ctx)
count += !ctx::for_each([&](auto &ctx)
{
if(id(ctx) == param.at<uint64_t>(i))
{