mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-02 03:20:06 +00:00
VST: made sure the VstSpeakerConfiguration is never created with a size smaller than the original structure definition
This commit is contained in:
parent
f088225bce
commit
997c669260
1 changed files with 2 additions and 2 deletions
|
|
@ -180,8 +180,8 @@ struct SpeakerMappings : private AudioChannelSet // (inheritance only to give e
|
|||
|
||||
VstSpeakerConfiguration* allocate (int numChannels)
|
||||
{
|
||||
auto arrangementSize = (sizeof (VstSpeakerConfiguration) - (sizeof(VstIndividualSpeakerInfo) * 8))
|
||||
+ (sizeof (VstIndividualSpeakerInfo) * static_cast<size_t> (numChannels));
|
||||
auto arrangementSize = sizeof (VstSpeakerConfiguration)
|
||||
+ sizeof (VstIndividualSpeakerInfo) * static_cast<size_t> (jmax (8, numChannels) - 8);
|
||||
|
||||
storage.malloc (1, arrangementSize);
|
||||
return storage.getData();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue