diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 8c41e8ade..c2c58dae2 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -7461,6 +7461,11 @@ static struct card *pspice_compat(struct card *oldcard) char *ntok = nexttok(cut_line); ntok = nexttok(ntok); ntok = nexttok(ntok); + if (!ntok){ + fprintf(stderr, "Error: Missing token in line %d:\n%s\n", card->linenum, cut_line); + fprintf(stderr, " Please correct the input file\n"); + controlled_exit(1); + } char *tctok = search_plain_identifier(ntok, "tc"); if (tctok) { char *tctok1 = strchr(tctok, '=');