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
66cbac3f4e
commit
741cab390f
|
|
@ -7232,7 +7232,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 */
|
||||||
|
|
@ -7285,7 +7285,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