Fixed buffer pointer offset when copying data.

This commit is contained in:
Vincent Richard 2014-12-03 20:09:46 +01:00
parent 31df6171de
commit 07ae82f17a

View File

@ -123,7 +123,7 @@ void SMTPChunkingOutputStreamAdapter::writeImpl
const size_t remaining = sizeof(m_buffer) - m_bufferSize; const size_t remaining = sizeof(m_buffer) - m_bufferSize;
const size_t bytesToCopy = std::min(remaining, curCount); const size_t bytesToCopy = std::min(remaining, curCount);
std::copy(data, data + bytesToCopy, m_buffer + m_bufferSize); std::copy(curData, curData + bytesToCopy, m_buffer + m_bufferSize);
m_bufferSize += bytesToCopy; m_bufferSize += bytesToCopy;
curData += bytesToCopy; curData += bytesToCopy;