Browse Source

Avoid crash, and send error message when r,l,c

instance lines does not have enough tokens.
pre-master-46
Holger Vogt 7 years ago
parent
commit
972785095f
  1. 5
      src/frontend/inpcom.c

5
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, '=');

Loading…
Cancel
Save