Skip to content

Commit

Permalink
Merge pull request #1 from hyperpenelope/dev/lv2_file_generator-segfa…
Browse files Browse the repository at this point in the history
…ult-saving-presets

makePresetsFile(): plugin parameters should be indexed by j, not i
  • Loading branch information
hyperpenelope authored May 17, 2022
2 parents d9d252b + 69102ee commit 72580fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LV2/juce_LV2_FileCreator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,9 +515,9 @@ class JuceLV2FileCreator
preset += " [\n";
}

String const paramName = params[i]->getName(1000);
String const paramName = params[j]->getName(1000);
preset += " lv2:symbol \"" + nameToSymbol(paramName, j) + "\" ;\n";
preset += " pset:value " + String::formatted("%f", safeParamValue(params[i]->getValue())) + " ;\n";
preset += " pset:value " + String::formatted("%f", safeParamValue(params[j]->getValue())) + " ;\n";

if (j + 1 == params.size())
{
Expand Down

0 comments on commit 72580fb

Please sign in to comment.