diff --git a/src/net/Client.cpp b/src/net/Client.cpp index fb83acd2b..eb07bf21a 100644 --- a/src/net/Client.cpp +++ b/src/net/Client.cpp @@ -4,8 +4,8 @@ * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> - * Copyright 2016-2017 XMRig <support@xmrig.com> - * + * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> + * Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * 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<char*>(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 699f49039..2cc169153 100644 --- a/src/net/Client.h +++ b/src/net/Client.h @@ -4,8 +4,8 @@ * Copyright 2014 Lucas Jones <https://github.com/lucasjones> * Copyright 2014-2016 Wolf9466 <https://github.com/OhGodAPet> * Copyright 2016 Jay D Dee <jayddee246@gmail.com> - * Copyright 2016-2017 XMRig <support@xmrig.com> - * + * Copyright 2017-2018 XMR-Stak <https://github.com/fireice-uk>, <https://github.com/psychocrypt> + * Copyright 2016-2018 XMRig <https://github.com/xmrig>, <support@xmrig.com> * * 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