1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-03-01 17:34:24 +01:00

Bug1858: Allow empty default choice on $ control lines (again)

This commit is contained in:
Paul Licameli
2018-03-24 16:16:54 -04:00
parent 05ef58753a
commit 37541de6be

View File

@@ -1865,7 +1865,7 @@ bool NyquistEffect::Parse(
return true;
}
if (len >= 6 && tokens[0] == wxT("control")) {
if (len >= 5 && tokens[0] == wxT("control")) {
NyqControl ctrl;
ctrl.var = tokens[1];
@@ -1874,7 +1874,7 @@ bool NyquistEffect::Parse(
ctrl.label = tokens[4];
// valStr may or may not be a quoted string
ctrl.valStr = tokens[5];
ctrl.valStr = len > 5 ? tokens[5] : wxT("");
ctrl.val = GetCtrlValue(ctrl.valStr);
if (ctrl.valStr[0] == wxT('(') || ctrl.valStr[0] == wxT('"'))
ctrl.valStr = UnQuote( ctrl.valStr );