diff --git a/src/include/ngspice/pssdefs.h b/src/include/ngspice/pssdefs.h index 45dce527c..340dbee5e 100644 --- a/src/include/ngspice/pssdefs.h +++ b/src/include/ngspice/pssdefs.h @@ -50,6 +50,7 @@ typedef struct { double PACfStop; /* input-frequency sweep stop (Hz) */ int PACpoints; /* points per decade/octave, or total for linear */ int PACstepType; /* 0 = LIN, 1 = DEC, 2 = OCT */ + int PACmaxSideband; /* number of output conversion sidebands each side (0 = sb0 only) */ } PSSan; enum { @@ -66,6 +67,7 @@ enum { PAC_FSTOP, PAC_POINTS, PAC_STEPTYPE, + PAC_MAXSB, }; #endif diff --git a/src/maths/KLU/klusmp.c b/src/maths/KLU/klusmp.c index 1546fd3a7..e82010d40 100644 --- a/src/maths/KLU/klusmp.c +++ b/src/maths/KLU/klusmp.c @@ -1852,6 +1852,10 @@ SMPfindElt (SMPmatrix *eMatrix, int Row, int Col, int CreateIfMissing) assert (IS_SPARSE (Matrix)) ; Row = Matrix->ExtToIntRowMap [Row] ; Col = Matrix->ExtToIntColMap [Col] ; + if (Row < 0 || Col < 0) { + fprintf(stderr, "Warning: element not found, as internal Row/Col map is not avaialable!\n"); + return NULL; + } Element = Matrix->FirstInCol [Col] ; Element = spcFindElementInCol (Matrix, &Element, Row, Col, CreateIfMissing) ; return (SMPelement *)Element ;