diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-08-11 12:00:11 +0200 |
---|---|---|
committer | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-08-11 12:00:11 +0200 |
commit | 1ffb26311b5d74e9f607ec31bee6c17bbae6fdae (patch) | |
tree | 9bce3e34d4dc590e4b4d9c3ae5bd92d60dd27bd3 | |
parent | b9b51f9579c15c9789814cd4b6969b0f85e13980 (diff) |
MultiCommand::toJSON: Fix use-after-move
-rw-r--r-- | src/libutil/args.cc | 2 |
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); } |