1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

Use UTF8 instead of ASCII decoding for heartbeats

This commit is contained in:
Marius Ungureanu
2015-09-18 06:20:10 +03:00
parent c42b885e1f
commit ba35bfc624

View File

@@ -446,7 +446,7 @@ namespace Lidgren.Network
if (m_upnp != null && now < m_upnp.m_discoveryResponseDeadline && bytesReceived > 32)
{
// is this an UPnP response?
string resp = System.Text.Encoding.ASCII.GetString(m_receiveBuffer, 0, bytesReceived);
string resp = System.Text.Encoding.UTF8.GetString(m_receiveBuffer, 0, bytesReceived);
if (resp.Contains("upnp:rootdevice") || resp.Contains("UPnP/1.0"))
{
try