summaryrefslogtreecommitdiff
path: root/core/io/stream_peer.cpp
diff options
context:
space:
mode:
authorRaymoo <uguu@installgentoo.com>2017-08-12 01:19:50 -0700
committerRaymoo <uguu@installgentoo.com>2017-08-12 01:19:50 -0700
commitf87100780e7a58f4efcc23d2d80739d630ca9f24 (patch)
treedc587ced5304468943ef641a7b13eb2c788c8fa8 /core/io/stream_peer.cpp
parent23f6d3fa69935c90c6cdcee342ae99d226e9b4ab (diff)
Fix broken stream reading in StreamPeerBuffer
Diffstat (limited to 'core/io/stream_peer.cpp')
-rw-r--r--core/io/stream_peer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp
index fdad7c7bdf..faf0700edf 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<uint8_t>::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_*
}