diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index d9b9bada9..30f698640 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -409,15 +409,15 @@ command_process(Client &client, unsigned num, char *line) noexcept StaticVector argv; while (true) { + char *a = tokenizer.NextParam(); + if (a == nullptr) + break; + if (argv.full()) { r.Error(ACK_ERROR_ARG, "Too many arguments"); return CommandResult::ERROR; } - char *a = tokenizer.NextParam(); - if (a == nullptr) - break; - argv.push_back(a); }