Skip to content

Commit

Permalink
Respect the pos parameter in WriteBuffer::replaceRawData
Browse files Browse the repository at this point in the history
This omission didn't actually break anything, because `pos` is always
0.
  • Loading branch information
rprichard committed Oct 20, 2016
1 parent 68c0c14 commit 91fce49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/Buffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void WriteBuffer::putRawData(const void *data, size_t len) {
void WriteBuffer::replaceRawData(size_t pos, const void *data, size_t len) {
ASSERT(pos <= m_buf.size() && len <= m_buf.size() - pos);
const auto p = reinterpret_cast<const char*>(data);
std::copy(p, p + len, m_buf.begin());
std::copy(p, p + len, &m_buf[pos]);
}

void WriteBuffer::putInt32(int32_t i) {
Expand Down

0 comments on commit 91fce49

Please sign in to comment.