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

Warnings and minor inconsistencies fixed

This commit is contained in:
lidgren
2014-08-25 07:34:56 +00:00
parent eb9dbdda40
commit f2aa4b4ce2
12 changed files with 115 additions and 105 deletions

View File

@@ -36,9 +36,12 @@ namespace UnitTests
// convert to incoming message
NetIncomingMessage im = Program.CreateIncomingMessage(om.PeekDataBuffer(), om.LengthBits);
if (im.Data == null || im.Data.Length == 0)
throw new NetException("bad im!");
im.Decrypt(algo);
if (im.LengthBits != trueLen)
if (im.Data == null || im.Data.Length == 0 || im.LengthBits != trueLen)
throw new NetException("Length fail");
if (im.ReadString() != "Hallon")

View File

@@ -36,7 +36,7 @@ namespace UnitTests
catch (NetException nex)
{
if (nex.Message != "This message has already been sent! Use NetPeer.SendMessage() to send to multiple recipients efficiently")
throw nex;
throw;
}
peer.Shutdown("bye");