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

Fix for __CONSTRAINED__ and __ANDROID__

This commit is contained in:
Michael Lidgren
2016-02-25 07:34:39 +01:00
parent 8c7b5fb775
commit 38c1c60311
2 changed files with 10 additions and 4 deletions

View File

@@ -12,8 +12,6 @@ namespace Lidgren.Network
static NetUtility()
{
s_randomMacBytes = new byte[8];
MWCRandom.Instance.NextBytes(s_randomMacBytes);
}
[CLSCompliant(false)]
@@ -50,6 +48,11 @@ namespace Lidgren.Network
public static byte[] GetMacAddressBytes()
{
if (s_randomMacBytes == null)
{
s_randomMacBytes = new byte[8];
MWCRandom.Instance.NextBytes(s_randomMacBytes);
}
return s_randomMacBytes;
}

View File

@@ -12,8 +12,6 @@ namespace Lidgren.Network
static NetUtility()
{
s_randomMacBytes = new byte[8];
MWCRandom.Instance.NextBytes(s_randomMacBytes);
}
[CLSCompliant(false)]
@@ -48,6 +46,11 @@ namespace Lidgren.Network
public static byte[] GetMacAddressBytes()
{
if (s_randomMacBytes == null)
{
s_randomMacBytes = new byte[8];
MWCRandom.Instance.NextBytes(s_randomMacBytes);
}
return s_randomMacBytes;
}