Use BareNetworkString to correctly decode requests-for-servers.

This commit is contained in:
hiker 2016-02-25 09:49:09 +11:00
parent 1655a4889d
commit 9d546d4980

View File

@ -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 =