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:
parent
b028f299b8
commit
d5bdca9695
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue