From f87100780e7a58f4efcc23d2d80739d630ca9f24 Mon Sep 17 00:00:00 2001 From: Raymoo Date: Sat, 12 Aug 2017 01:19:50 -0700 Subject: [PATCH] Fix broken stream reading in StreamPeerBuffer --- core/io/stream_peer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index fdad7c7bdf2..faf0700edf3 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -459,8 +459,9 @@ Error StreamPeerBuffer::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_ } PoolVector::Read r = data.read(); - copymem(p_buffer, r.ptr(), r_received); + copymem(p_buffer, r.ptr() + pointer, r_received); + pointer += r_received; // FIXME: return what? OK or ERR_* }