Browse Source

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
pre-master-46
Holger Vogt 5 years ago
parent
commit
741cab390f
  1. 4
      src/frontend/inpcom.c

4
src/frontend/inpcom.c

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

Loading…
Cancel
Save