Fix note events copy

This commit is contained in:
Jean Pierre Cimalando 2021-04-11 19:39:27 +02:00
parent 25370e82bc
commit 86d82060ad

View file

@ -5,6 +5,7 @@
// If not, contact the sfizz maintainers at https://github.com/sfztools/sfizz
#include "SfizzVstUpdates.h"
#include <algorithm>
#include <cstring>
OSCUpdate::~OSCUpdate()
@ -57,7 +58,7 @@ void NoteUpdate::setEvents(const std::pair<uint32_t, float>* events, uint32_t co
if (copy) {
auto *buffer = new std::pair<uint32_t, float>[count];
std::memcpy(buffer, events, count);
std::copy_n(events, count, buffer);
events = buffer;
}