From f5f43e4e6273401aa62a03bd54099c85fa0cb8a1 Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Sun, 23 May 2021 01:31:13 +0300 Subject: p18: fix set-output-model --- src/p18/commands.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/p18') diff --git a/src/p18/commands.cc b/src/p18/commands.cc index 74a0571..f67fe99 100644 --- a/src/p18/commands.cc +++ b/src/p18/commands.cc @@ -378,7 +378,7 @@ p18::CommandType validate_input(std::string& command, throw std::invalid_argument("invalid id"); std::array allowed({"SM", "P", "P1", "P2", "P3"}); - long index = index_of(allowed, arguments[0]); + long index = index_of(allowed, arguments[1]); if (index == -1) throw std::invalid_argument("invalid model"); arguments[1] = std::to_string(index); -- cgit v1.2.3