Merge pull request #915 from diamante0018/develop

[Command]: Return if empty
This commit is contained in:
Edo 2023-04-09 15:29:13 +02:00 committed by GitHub
commit 1f94353e1a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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