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

Passed maximum name length when calling VST getParameterName().

This commit is contained in:
jules 2013-12-02 11:17:43 +00:00
parent a316bd5f6f
commit 53cbc74986
2 changed files with 3 additions and 3 deletions

View file

@ -861,7 +861,7 @@ private:
void GetNameOfLength (char* name, int maxLength, OSType inControllerType) const
{
// Pro-tools expects all your parameters to have valid names!
jassert (juceFilter->getParameterName (index).isNotEmpty());
jassert (juceFilter->getParameterName (index, maxLength).isNotEmpty());
juceFilter->getParameterName (index, maxLength).copyToUTF8 (name, (size_t) maxLength + 1);
}

View file

@ -831,7 +831,7 @@ public:
if (filter != nullptr)
{
jassert (isPositiveAndBelow (index, filter->getNumParameters()));
filter->getParameterText (index).copyToUTF8 (text, 24); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
filter->getParameterText (index, 24).copyToUTF8 (text, 24); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
}
}
@ -840,7 +840,7 @@ public:
if (filter != nullptr)
{
jassert (isPositiveAndBelow (index, filter->getNumParameters()));
filter->getParameterName (index).copyToUTF8 (text, 16); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
filter->getParameterName (index, 16).copyToUTF8 (text, 16); // length should technically be kVstMaxParamStrLen, which is 8, but hosts will normally allow a bit more.
}
}