summaryrefslogtreecommitdiffstats
path: root/src/Protocol/ProtocolRecognizer.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2020-09-12 22:08:23 +0200
committerTiger Wang <ziwei.tiger@outlook.com>2020-09-18 17:41:06 +0200
commit7f372b12cb01f7df9d5466de11b36494353613a8 (patch)
treecdc570e1e5318beba83cc3b165efa0704b2c0edb /src/Protocol/ProtocolRecognizer.cpp
parentRemove unused ServerPort member (diff)
downloadcuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar.gz
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar.bz2
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar.lz
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar.xz
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.tar.zst
cuberite-7f372b12cb01f7df9d5466de11b36494353613a8.zip
Diffstat (limited to 'src/Protocol/ProtocolRecognizer.cpp')
-rw-r--r--src/Protocol/ProtocolRecognizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Protocol/ProtocolRecognizer.cpp b/src/Protocol/ProtocolRecognizer.cpp
index e78ed6d6c..ef273d9e6 100644
--- a/src/Protocol/ProtocolRecognizer.cpp
+++ b/src/Protocol/ProtocolRecognizer.cpp
@@ -244,7 +244,7 @@ std::unique_ptr<cProtocol> cMultiVersionProtocol::TryRecognizeLengthedProtocol(c
UInt32 ProtocolVersion;
AString ServerAddress;
UInt16 ServerPort;
- UInt32 NextState;
+ cProtocol::State NextState;
if (!m_Buffer.ReadVarInt(PacketType) || (PacketType != 0x00))
{
@@ -308,7 +308,7 @@ std::unique_ptr<cProtocol> cMultiVersionProtocol::TryRecognizeLengthedProtocol(c
a_Client.GetIPString().c_str(), ProtocolVersion, ProtocolVersion
);
- if (NextState != 1)
+ if (NextState != cProtocol::State::Status)
{
throw sTriedToJoinWithUnsupportedProtocolException(
Printf("Unsupported protocol version %u.\nTry connecting with Minecraft " MCS_CLIENT_VERSIONS, ProtocolVersion)