diff --git a/src/net/Client.cpp b/src/net/Client.cpp index fb83acd2..eb07bf21 100644 --- a/src/net/Client.cpp +++ b/src/net/Client.cpp @@ -4,8 +4,8 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig - * + * Copyright 2017-2018 XMR-Stak , + * Copyright 2016-2018 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -592,7 +592,7 @@ void Client::onRead(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) client->m_recvBufPos += nread; char* end; - char* start = buf->base; + char* start = client->m_recvBuf.base; size_t remaining = client->m_recvBufPos; while ((end = static_cast(memchr(start, '\n', remaining))) != nullptr) { @@ -609,11 +609,11 @@ void Client::onRead(uv_stream_t *stream, ssize_t nread, const uv_buf_t *buf) return; } - if (start == buf->base) { + if (start == client->m_recvBuf.base) { return; } - memcpy(buf->base, start, remaining); + memcpy(client->m_recvBuf.base, start, remaining); client->m_recvBufPos = remaining; } diff --git a/src/net/Client.h b/src/net/Client.h index 699f4903..2cc16915 100644 --- a/src/net/Client.h +++ b/src/net/Client.h @@ -4,8 +4,8 @@ * Copyright 2014 Lucas Jones * Copyright 2014-2016 Wolf9466 * Copyright 2016 Jay D Dee - * Copyright 2016-2017 XMRig - * + * Copyright 2017-2018 XMR-Stak , + * Copyright 2016-2018 XMRig , * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by