From f32f3ac8cd8e1bd5155dc0294b2d6e5749652661 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 13 Mar 2023 09:59:29 +0100 Subject: [PATCH] Improve previous commit: A bad .model line leads to a breakup of the simulation. --- src/frontend/inpcom.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index b98ea8163..ed32283e8 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -10277,10 +10277,9 @@ void inp_rem_unused_models(struct nscope *root, struct card *deck) modl_new = TMALLOC(struct modellist, 1); char *model_type = get_model_type(curr_line); if (!model_type) { - fprintf(stderr, "Warning: no model type given in line %s, ignored!\n", curr_line); + fprintf(stderr, "Error: no model type given in line %s!\n", curr_line); tfree(modl_new); - *curr_line = '*'; - continue; + controlled_exit(EXIT_BAD); } modl_new->elemb = inp_get_elem_ident(model_type); modl_new->modelname = get_subckt_model_name(curr_line);