summaryrefslogtreecommitdiff
path: root/src/connectionhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/connectionhandler.cpp')
-rw-r--r--src/connectionhandler.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/connectionhandler.cpp b/src/connectionhandler.cpp
index ad42adcf..6a46b94e 100644
--- a/src/connectionhandler.cpp
+++ b/src/connectionhandler.cpp
@@ -188,8 +188,8 @@ ConnectionHandler::startListen(ListenThreadData *ltd)
std::string ipaddr = ip4ToString(
SDLNet_TCP_GetPeerAddress(s)->host);
- // Make sure that the packet is big enough
- if (result >= 4)
+ // Make sure that the packet is big enough (> short)
+ if (result >= 2)
{
Packet *packet = new Packet(buffer, result);
MessageIn msg(packet); // (MessageIn frees packet)