diff options
-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); |