From fbe7b1cf10fb8d769149259b269382451263f025 Mon Sep 17 00:00:00 2001 From: Diavolo Date: Sun, 9 Apr 2023 15:19:04 +0200 Subject: [PATCH] [Command]: Return if empty --- src/Components/Modules/Command.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Components/Modules/Command.cpp b/src/Components/Modules/Command.cpp index 0aa4430c..b203f7d2 100644 --- a/src/Components/Modules/Command.cpp +++ b/src/Components/Modules/Command.cpp @@ -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);