summaryrefslogtreecommitdiffstats
path: root/src/network/Network.cpp
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-31 16:17:09 +0200
committerLaG1924 <12997935+LaG1924@users.noreply.github.com>2017-05-31 16:17:09 +0200
commitf721ed0e3c6be33670fe330c029a2d4c3353f635 (patch)
tree5afad5a292171d546d9ded16de6151a014883d84 /src/network/Network.cpp
parent2017-05-28 (diff)
downloadAltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.gz
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.bz2
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.lz
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.xz
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.tar.zst
AltCraft-f721ed0e3c6be33670fe330c029a2d4c3353f635.zip
Diffstat (limited to '')
-rw-r--r--src/network/Network.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/Network.cpp b/src/network/Network.cpp
index b3b1e4b..7757be9 100644
--- a/src/network/Network.cpp
+++ b/src/network/Network.cpp
@@ -1,5 +1,4 @@
#include "Network.hpp"
-#include "../packet/PacketBuilder.hpp"
Network::Network(std::string address, unsigned short port) : m_address(address), m_port(port) {
LOG(INFO) << "Connecting to server " << m_address << ":" << m_port;
@@ -55,7 +54,7 @@ Packet Network::ReceivePacket() {
break;
}
}
- Field fLen = FieldParser::Parse(VarInt, bufLen);
+ Field fLen = FieldParser::Parse(VarIntType, bufLen);
size_t packetLen = fLen.GetVarInt() + fLen.GetLength();
if (packetLen > 1024 * 1024 * 15)
LOG(WARNING)<<"OMG SIZEOF PACKAGE IS "<<packetLen;