From d75bbdd03d4f9246fe52814d75b9aa20b14a1e98 Mon Sep 17 00:00:00 2001 From: ElNounch Date: Wed, 17 Aug 2016 07:37:48 +0000 Subject: Fixing string literal catching word letter as hexa-digit Was sending "\x08C""uberite" as plugin identifier, aka a String of lenght (Varint 0x8c 0x75 ->) 14988 characters but only 7 provided Now sending "\x08""Cuberite" as plugin identifier, aka a String of lenght (Varint 0x08 ->) 8 characters, with 8 provided Fix BungeeCord compatibility --- src/Protocol/Protocol18x.cpp | 2 +- src/Protocol/Protocol19x.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp index ae9571f03..b158dee4d 100644 --- a/src/Protocol/Protocol18x.cpp +++ b/src/Protocol/Protocol18x.cpp @@ -2714,7 +2714,7 @@ void cProtocol180::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Brand); m_Client->SetClientBrand(Brand); // Send back our brand, including the length: - SendPluginMessage("MC|Brand", "\x08Cuberite"); + SendPluginMessage("MC|Brand", "\x08""Cuberite"); return; } else if (a_Channel == "MC|Beacon") diff --git a/src/Protocol/Protocol19x.cpp b/src/Protocol/Protocol19x.cpp index c11e05565..b0e458691 100644 --- a/src/Protocol/Protocol19x.cpp +++ b/src/Protocol/Protocol19x.cpp @@ -2819,7 +2819,7 @@ void cProtocol190::HandleVanillaPluginMessage(cByteBuffer & a_ByteBuffer, const HANDLE_READ(a_ByteBuffer, ReadVarUTF8String, AString, Brand); m_Client->SetClientBrand(Brand); // Send back our brand, including the length: - SendPluginMessage("MC|Brand", "\x08Cuberite"); + SendPluginMessage("MC|Brand", "\x08""Cuberite"); return; } else if (a_Channel == "MC|Beacon") -- cgit v1.2.3