diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/websocket/emws_peer.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp index f396a1c812..9472daa620 100644 --- a/modules/websocket/emws_peer.cpp +++ b/modules/websocket/emws_peer.cpp @@ -90,12 +90,11 @@ Error EMWSPeer::get_packet(const uint8_t **r_buffer, int &r_buffer_size) { if (_in_buffer.packets_left() == 0) return ERR_UNAVAILABLE; - uint8_t *rw = _packet_buffer.ptrw(); int read = 0; - Error err = _in_buffer.read_packet(rw.ptr(), _packet_buffer.size(), &_is_string, read); + Error err = _in_buffer.read_packet(_packet_buffer.ptrw(), _packet_buffer.size(), &_is_string, read); ERR_FAIL_COND_V(err != OK, err); - *r_buffer = rw.ptr(); + *r_buffer = _packet_buffer.ptr(); r_buffer_size = read; return OK; |