Use BareNetworkString.
This commit is contained in:
parent
28bb228914
commit
1655a4889d
@ -170,9 +170,9 @@ Online::XMLRequest* ServersManager::getLANRefreshRequest() const
|
|||||||
int len = broadcast->receiveRawPacket(buffer, LEN, &sender, 1);
|
int len = broadcast->receiveRawPacket(buffer, LEN, &sender, 1);
|
||||||
if(len>0)
|
if(len>0)
|
||||||
{
|
{
|
||||||
NewNetworkString s((uint8_t*)buffer, len);
|
BareNetworkString s(buffer, len);
|
||||||
irr::core::stringw name;
|
irr::core::stringw name;
|
||||||
// name_len is the number of bytes read
|
// bytes_read is the number of bytes read
|
||||||
uint8_t bytes_read = s.decodeStringW(0, &name);
|
uint8_t bytes_read = s.decodeStringW(0, &name);
|
||||||
uint8_t max_players = s.getUInt8(bytes_read );
|
uint8_t max_players = s.getUInt8(bytes_read );
|
||||||
uint8_t players = s.getUInt8(bytes_read+1);
|
uint8_t players = s.getUInt8(bytes_read+1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user