Fix PacketBuffer HasNext operator
This commit is contained in:
parent
9b9084d2fe
commit
3aecc7b026
@ -65,6 +65,7 @@ namespace Network {
|
|||||||
int Port = PacketPeer.GetPacketPort();
|
int Port = PacketPeer.GetPacketPort();
|
||||||
|
|
||||||
PacketBuffer PB = PacketBuffer.FromByteBuffer(Buffer);
|
PacketBuffer PB = PacketBuffer.FromByteBuffer(Buffer);
|
||||||
|
|
||||||
if (PB.Length > ConfirmationBytes.Length) {
|
if (PB.Length > ConfirmationBytes.Length) {
|
||||||
bool Confirmed = true;
|
bool Confirmed = true;
|
||||||
foreach (byte B in ConfirmationBytes) {
|
foreach (byte B in ConfirmationBytes) {
|
||||||
|
@ -9,7 +9,7 @@ namespace Network.PacketHandling {
|
|||||||
|
|
||||||
public byte[] ByteBuffer { get { return ByteList.ToArray(); } }
|
public byte[] ByteBuffer { get { return ByteList.ToArray(); } }
|
||||||
public int Length { get { return ByteList.Count; } }
|
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() {
|
public byte Read() {
|
||||||
if (!HasNext) {
|
if (!HasNext) {
|
||||||
|
Loading…
Reference in New Issue
Block a user