From 1655a4889d5f407f4aeb99965ebb2b539dabcbe7 Mon Sep 17 00:00:00 2001 From: hiker Date: Thu, 25 Feb 2016 09:48:47 +1100 Subject: [PATCH] Use BareNetworkString. --- src/network/servers_manager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/servers_manager.cpp b/src/network/servers_manager.cpp index 4400f16c6..d8a35cb5a 100644 --- a/src/network/servers_manager.cpp +++ b/src/network/servers_manager.cpp @@ -170,10 +170,10 @@ Online::XMLRequest* ServersManager::getLANRefreshRequest() const int len = broadcast->receiveRawPacket(buffer, LEN, &sender, 1); if(len>0) { - NewNetworkString s((uint8_t*)buffer, len); + BareNetworkString s(buffer, len); irr::core::stringw name; - // name_len is the number of bytes read - uint8_t bytes_read = s.decodeStringW(0, &name); + // bytes_read is the number of bytes read + uint8_t bytes_read = s.decodeStringW(0, &name); uint8_t max_players = s.getUInt8(bytes_read ); uint8_t players = s.getUInt8(bytes_read+1); uint32_t my_ip = s.getUInt32(bytes_read+2);