diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:31:13 +0300 |
---|---|---|
committer | Evgeny Zinoviev <me@ch1p.io> | 2021-05-23 01:31:13 +0300 |
commit | f5f43e4e6273401aa62a03bd54099c85fa0cb8a1 (patch) | |
tree | 16192544f93ae1e3b1f4fd8dc4c899c5b8a2faea | |
parent | 11e47bd708bde2c8e3ef3b6849b1dd7f8fbfe607 (diff) |
p18: fix set-output-model
-rw-r--r-- | src/p18/commands.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<std::string, 5> 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); |