From 9d5454ef9a7148010138fffd24a16c9bffb445f0 Mon Sep 17 00:00:00 2001
From: Julian Waller <git@julusian.co.uk>
Date: Mon, 22 Jun 2020 12:30:08 +0100
Subject: [PATCH] fix: no parameters passed to commands using a subcommand

---
 src/protocol/amcp/amcp_command_repository.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/protocol/amcp/amcp_command_repository.cpp b/src/protocol/amcp/amcp_command_repository.cpp
index 492b537e7b..f6f887ce5a 100644
--- a/src/protocol/amcp/amcp_command_repository.cpp
+++ b/src/protocol/amcp/amcp_command_repository.cpp
@@ -49,6 +49,7 @@ AMCPCommand::ptr_type find_command(const std::map<std::wstring, std::pair<amcp_c
 
         if (subcmd != commands.end()) {
             tokens.pop_front();
+            ctx.parameters = std::move(std::vector<std::wstring>(tokens.begin(), tokens.end()));
             return std::make_shared<AMCPCommand>(
                 ctx, subcmd->second.first, subcmd->second.second, fullname, request_id);
         }