MultiCommand::toJSON: Fix use-after-move

This commit is contained in:
Yorick van Pelt 2023-08-11 12:00:11 +02:00
parent b9b51f9579
commit 1ffb26311b
No known key found for this signature in database
GPG Key ID: D8D3CC6D951384DE

View File

@ -410,8 +410,8 @@ nlohmann::json MultiCommand::toJSON()
auto cat = nlohmann::json::object();
cat["id"] = command->category();
cat["description"] = trim(categories[command->category()]);
j["category"] = std::move(cat);
cat["experimental-feature"] = command->experimentalFeature();
j["category"] = std::move(cat);
cmds[name] = std::move(j);
}