mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
VST: Fix incorrect upper bound of jlimit() in getProgramName()
This commit is contained in:
parent
7c609484e8
commit
3e542f3465
1 changed files with 1 additions and 1 deletions
|
|
@ -1585,7 +1585,7 @@ struct VSTPluginInstance final : public AudioPluginInstance,
|
|||
{
|
||||
char nm[264] = { 0 };
|
||||
|
||||
if (dispatch (Vst2::effGetProgramNameIndexed, jlimit (0, getNumPrograms(), index), -1, nm, 0) != 0)
|
||||
if (dispatch (Vst2::effGetProgramNameIndexed, jlimit (0, getNumPrograms() - 1, index), -1, nm, 0) != 0)
|
||||
return String::fromUTF8 (nm).trim();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue