diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-17 16:13:32 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2021-01-19 10:54:58 +0100 |
commit | 49ef21d6505c76fb26d50c99934e801ba6016049 (patch) | |
tree | 85fb980259f4ae19fc66cba27bbba24f6ffc713c /src/Protocol/Protocol_1_8.cpp | |
parent | cChunk: don't inherit from cChunkDef (#5106) (diff) | |
download | cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.gz cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.bz2 cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.lz cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.xz cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.tar.zst cuberite-49ef21d6505c76fb26d50c99934e801ba6016049.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol_1_8.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Protocol/Protocol_1_8.cpp b/src/Protocol/Protocol_1_8.cpp index be855678e..a4876c448 100644 --- a/src/Protocol/Protocol_1_8.cpp +++ b/src/Protocol/Protocol_1_8.cpp @@ -177,6 +177,13 @@ void cProtocol_1_8_0::DataReceived(cByteBuffer & a_Buffer, const char * a_Data, { if (m_IsEncrypted) { + // An artefact of the protocol recogniser, will be removed when decryption done in-place: + if (a_Size == 0) + { + AddReceivedData(a_Buffer, nullptr, 0); + return; + } + std::byte Decrypted[512]; while (a_Size > 0) { |