Browse Source

Prevent crash if no or not enough coeffs are given.

r is then probably not the repeat coefficient.
pre-master-46
Holger Vogt 3 years ago
parent
commit
cb9cc7140d
  1. 6
      src/spicelib/devices/vsrc/vsrcpar.c

6
src/spicelib/devices/vsrc/vsrcpar.c

@ -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;

Loading…
Cancel
Save