aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick van Pelt <yorick@yorickvanpelt.nl>2023-08-11 12:00:11 +0200
committerYorick van Pelt <yorick@yorickvanpelt.nl>2023-08-11 12:00:11 +0200
commit1ffb26311b5d74e9f607ec31bee6c17bbae6fdae (patch)
tree9bce3e34d4dc590e4b4d9c3ae5bd92d60dd27bd3
parentb9b51f9579c15c9789814cd4b6969b0f85e13980 (diff)
MultiCommand::toJSON: Fix use-after-move
-rw-r--r--src/libutil/args.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/args.cc b/src/libutil/args.cc
index 3cf3ed9ca..00281ce6f 100644
--- a/src/libutil/args.cc
+++ b/src/libutil/args.cc
@@ -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);
}