diff --git a/src/network/stk_host.cpp b/src/network/stk_host.cpp index aa270bb11..0c03a18a3 100644 --- a/src/network/stk_host.cpp +++ b/src/network/stk_host.cpp @@ -591,8 +591,10 @@ void STKHost::handleLANRequests() TransportAddress sender; int len = m_lan_network->receiveRawPacket(buffer, LEN, &sender, 1); if(len<=0) return; - - if (std::string(buffer, len) == "stk-server") + BareNetworkString message(buffer, len); + std::string command; + message.decodeString(0, &command); + if (command == "stk-server") { Log::verbose("STKHost", "Received LAN server query"); std::string name =