diff options
-rw-r--r-- | src/p18/commands.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/p18/commands.cc b/src/p18/commands.cc index f67fe99..5060d49 100644 --- a/src/p18/commands.cc +++ b/src/p18/commands.cc @@ -436,11 +436,13 @@ p18::CommandType validate_input(std::string& command, if (endHour > 23 || endMinute > 59) throw std::invalid_argument("invalid end time"); - arguments[0] = std::to_string(startHour); - arguments[1] = std::to_string(startMinute); + arguments.clear(); - arguments[2] = std::to_string(endHour); - arguments[3] = std::to_string(endMinute); + arguments.emplace_back(std::to_string(startHour)); + arguments.emplace_back(std::to_string(startMinute)); + + arguments.emplace_back(std::to_string(endHour)); + arguments.emplace_back(std::to_string(endMinute)); break; } |