Fix broken stream reading in StreamPeerBuffer

This commit is contained in:
Raymoo 2017-08-12 01:19:50 -07:00
parent 23f6d3fa69
commit f87100780e
1 changed files with 2 additions and 1 deletions

View File

@ -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(); 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_* // FIXME: return what? OK or ERR_*
} }