Prevent a crash when the number of models exceeds MODNUMBERS
Raise MODNUMBERS to 2048 https://github.com/kicad-spice-library/KiCad-Spice-Library/issues/16
This commit is contained in:
parent
4895a4b5a9
commit
d16339b06f
|
|
@ -7230,7 +7230,7 @@ static void inp_quote_params(struct card *c, struct card *end_c,
|
||||||
*/
|
*/
|
||||||
static int inp_vdmos_model(struct card *deck)
|
static int inp_vdmos_model(struct card *deck)
|
||||||
{
|
{
|
||||||
#define MODNUMBERS 256
|
#define MODNUMBERS 2048
|
||||||
|
|
||||||
struct card *card;
|
struct card *card;
|
||||||
struct card *vmodels[MODNUMBERS]; /* list of pointers to vdmos model cards */
|
struct card *vmodels[MODNUMBERS]; /* list of pointers to vdmos model cards */
|
||||||
|
|
@ -7283,7 +7283,7 @@ static int inp_vdmos_model(struct card *deck)
|
||||||
j++;
|
j++;
|
||||||
if (j == MODNUMBERS) {
|
if (j == MODNUMBERS) {
|
||||||
vmodels[j - 1] = NULL;
|
vmodels[j - 1] = NULL;
|
||||||
continue;
|
break;
|
||||||
}
|
}
|
||||||
vmodels[j] = NULL;
|
vmodels[j] = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue