[Command]: Return if empty

This commit is contained in:
Diavolo 2023-04-09 15:19:04 +02:00
parent b6082da91a
commit fbe7b1cf10
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -116,6 +116,11 @@ namespace Components
void Command::Execute(std::string command, bool sync)
{
if (command.empty())
{
return;
}
command.append("\n"); // Make sure it's terminated
assert(command.size() < Game::MAX_CMD_LINE);