From 1ffb26311b5d74e9f607ec31bee6c17bbae6fdae Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Fri, 11 Aug 2023 12:00:11 +0200 Subject: [PATCH] MultiCommand::toJSON: Fix use-after-move --- src/libutil/args.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }