From eb0d1691b492963216ff680673a51ea0a3bd7735 Mon Sep 17 00:00:00 2001 From: Maximilian Wittfeld Date: Sat, 2 Nov 2024 09:14:49 +0100 Subject: [PATCH] fix(server): don't invoke cfx_internal:serverPrint on empty string We don't need to send the client "nothing" as data, so we discard it. --- .../src/packethandlers/ServerCommandPacketHandler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/code/components/citizen-server-impl/src/packethandlers/ServerCommandPacketHandler.cpp b/code/components/citizen-server-impl/src/packethandlers/ServerCommandPacketHandler.cpp index b0d3d09dea..db8baab7b6 100644 --- a/code/components/citizen-server-impl/src/packethandlers/ServerCommandPacketHandler.cpp +++ b/code/components/citizen-server-impl/src/packethandlers/ServerCommandPacketHandler.cpp @@ -115,6 +115,11 @@ bool ServerCommandPacketHandler::Process(fx::ServerInstanceBase* instance, const fx::ScopeDestructor destructor([&]() { + if (printString.empty()) + { + return; + } + msgpack::sbuffer sb; msgpack::packer packer(sb);