1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed some out-of-range channel copying in the AudioBuffer move operator

This commit is contained in:
jules 2017-12-19 14:23:14 +00:00
parent b028f299b8
commit d5bdca9695

View file

@ -183,7 +183,9 @@ public:
if (numChannels < (int) numElementsInArray (preallocatedChannelSpace))
{
channels = preallocatedChannelSpace;
memcpy (preallocatedChannelSpace, other.channels, sizeof (preallocatedChannelSpace));
for (int i = 0; i < numChannels; ++i)
preallocatedChannelSpace[i] = other.channels[i];
}
else
{
@ -207,7 +209,9 @@ public:
if (numChannels < (int) numElementsInArray (preallocatedChannelSpace))
{
channels = preallocatedChannelSpace;
memcpy (preallocatedChannelSpace, other.channels, sizeof (preallocatedChannelSpace));
for (int i = 0; i < numChannels; ++i)
preallocatedChannelSpace[i] = other.channels[i];
}
else
{