From 5b62c4c3145c08b093521e42c565922fa85de4ad Mon Sep 17 00:00:00 2001 From: Tiger Wang Date: Fri, 26 Jun 2015 17:24:51 -0500 Subject: Reorganised the redstone simulator -> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved --- src/ClientHandle.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ClientHandle.cpp') 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()) { -- cgit v1.2.3