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

Added NetPeer.ThrowOrLog

Changed a bunch of exceptions for consistency and safety
Enabled AutoExpandMTU for SpeedSample
This commit is contained in:
lidgren
2014-07-31 13:16:09 +00:00
parent 85a3b28bbf
commit 04593ef00f
10 changed files with 71 additions and 39 deletions

View File

@@ -500,8 +500,7 @@ namespace Lidgren.Network
int num2 = 0;
while (true)
{
if (num2 == 0x23)
throw new FormatException("Bad 7-bit encoded integer");
NetException.Assert(num2 != 0x23, "Bad 7-bit encoded integer");
byte num3 = buffer[offset++];
num1 |= (num3 & 0x7f) << (num2 & 0x1f);