fixed GH #1431: Poco/FIFOBuffer.h copy issue

This commit is contained in:
Guenter Obiltschnig 2016-10-07 21:27:07 +02:00
parent 737bd98b17
commit cdb2195ed3

View File

@ -325,7 +325,7 @@ public:
if (!isWritable()) if (!isWritable())
throw Poco::InvalidAccessException("Buffer not writable."); throw Poco::InvalidAccessException("Buffer not writable.");
std::memcpy(&_buffer[_used], ptr, length * sizeof(T)); std::memcpy(begin() + _used, ptr, length * sizeof(T));
std::size_t usedBefore = _used; std::size_t usedBefore = _used;
_used += length; _used += length;
if (_notify) notify(usedBefore); if (_notify) notify(usedBefore);