Prevent crash if no or not enough coeffs are given.

r is then probably not the repeat coefficient.
This commit is contained in:
Holger Vogt 2023-06-04 14:23:09 +02:00
parent 3420e66705
commit cb9cc7140d
1 changed files with 6 additions and 0 deletions

View File

@ -131,6 +131,12 @@ VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select)
here->VSRCrGiven = FALSE;
break;
}
if (!here->VSRCcoeffs || here->VSRCfunctionOrder < 2) {
here->VSRCrGiven = FALSE;
break;
}
here->VSRCr = value->rValue;
here->VSRCrGiven = TRUE;