From 3db0f36cbeffaf38c6aa412850613da2d3ad71f8 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Thu, 18 Sep 2014 21:31:42 +0300 Subject: [PATCH] client/state: Fix copying of packet data from deque to string --- src/client/state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/state.cpp b/src/client/state.cpp index 38299fa..85d3625 100644 --- a/src/client/state.cpp +++ b/src/client/state.cpp @@ -104,7 +104,7 @@ struct CState: public State return; log_i(MODULE, "Received full packet; type=%zu, length=6+%zu", type, size); - ss_ data(&m_socket_buffer[6], size); + ss_ data(m_socket_buffer.begin() + 6, m_socket_buffer.begin() + 6 + size); m_socket_buffer.erase(m_socket_buffer.begin(), m_socket_buffer.begin() + 6 + size); try {