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:
Holger Vogt 2021-04-11 17:57:30 +02:00
parent 66cbac3f4e
commit 741cab390f
1 changed files with 2 additions and 2 deletions

View File

@ -7232,7 +7232,7 @@ static void inp_quote_params(struct card *c, struct card *end_c,
*/
static int inp_vdmos_model(struct card *deck)
{
#define MODNUMBERS 256
#define MODNUMBERS 2048
struct card *card;
struct card *vmodels[MODNUMBERS]; /* list of pointers to vdmos model cards */
@ -7285,7 +7285,7 @@ static int inp_vdmos_model(struct card *deck)
j++;
if (j == MODNUMBERS) {
vmodels[j - 1] = NULL;
continue;
break;
}
vmodels[j] = NULL;
}