diff --git a/inc/buffer.hpp b/inc/buffer.hpp index b8513c1..f0210dd 100644 --- a/inc/buffer.hpp +++ b/inc/buffer.hpp @@ -59,7 +59,7 @@ class Buffer { } bool write(const char* buf, size_t len) { if (manualWrite(len)) { - ::memcpy(end(), buf, len); + ::memcpy(end() - len, buf, len); return true; } else { return false;