diff --git a/plugins/vst/SfizzVstUpdates.cpp b/plugins/vst/SfizzVstUpdates.cpp index d9921bdb..20e7c1e4 100644 --- a/plugins/vst/SfizzVstUpdates.cpp +++ b/plugins/vst/SfizzVstUpdates.cpp @@ -5,6 +5,7 @@ // If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz #include "SfizzVstUpdates.h" +#include #include OSCUpdate::~OSCUpdate() @@ -57,7 +58,7 @@ void NoteUpdate::setEvents(const std::pair* events, uint32_t co if (copy) { auto *buffer = new std::pair[count]; - std::memcpy(buffer, events, count); + std::copy_n(events, count, buffer); events = buffer; }