Fix PacketBuffer HasNext operator

This commit is contained in:
Sofia 2017-11-22 22:40:40 +02:00
parent 9b9084d2fe
commit 3aecc7b026
2 changed files with 2 additions and 1 deletions

View File

@ -65,6 +65,7 @@ namespace Network {
int Port = PacketPeer.GetPacketPort();
PacketBuffer PB = PacketBuffer.FromByteBuffer(Buffer);
if (PB.Length > ConfirmationBytes.Length) {
bool Confirmed = true;
foreach (byte B in ConfirmationBytes) {

View File

@ -9,7 +9,7 @@ namespace Network.PacketHandling {
public byte[] ByteBuffer { get { return ByteList.ToArray(); } }
public int Length { get { return ByteList.Count; } }
public bool HasNext { get { return ReadCounter > ByteList.Count; } }
public bool HasNext { get { return ReadCounter < ByteList.Count; } }
public byte Read() {
if (!HasNext) {