summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientHandle.cpp')
-rw-r--r--src/ClientHandle.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 9062d8cab..74556d2a0 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -927,6 +927,12 @@ void cClientHandle::HandleBeaconSelection(int a_PrimaryEffect, int a_SecondaryEf
void cClientHandle::HandleCommandBlockBlockChange(int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_NewCommand)
{
+ if (a_NewCommand.empty())
+ {
+ Kick("Command block string unexpectedly empty - hacked client?");
+ return;
+ }
+
cWorld * World = m_Player->GetWorld();
if (World->AreCommandBlocksEnabled())
{