summaryrefslogtreecommitdiffstats
path: root/core/io/packet_peer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/io/packet_peer.cpp')
-rw-r--r--core/io/packet_peer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/io/packet_peer.cpp b/core/io/packet_peer.cpp
index 973a2ec9a5..22b8bc0b39 100644
--- a/core/io/packet_peer.cpp
+++ b/core/io/packet_peer.cpp
@@ -180,10 +180,10 @@ int PacketPeerStream::get_available_packet_count() const {
ring_buffer.copy(lbuf,ofs,4);
uint32_t len = decode_uint32(lbuf);
remaining-=4;
- ofs+=4;
+ ofs+=4;
if (len>remaining)
break;
- remaining-=len;
+ remaining-=len;
ofs+=len;
count++;
}
@@ -201,7 +201,7 @@ Error PacketPeerStream::get_packet(const uint8_t **r_buffer,int &r_buffer_size)
uint8_t lbuf[4];
ring_buffer.copy(lbuf,0,4);
remaining-=4;
- uint32_t len = decode_uint32(lbuf);
+ uint32_t len = decode_uint32(lbuf);
ERR_FAIL_COND_V(remaining<(int)len,ERR_UNAVAILABLE);
ring_buffer.read(lbuf,4); //get rid of first 4 bytes