From 2dfdf984d6af9b92a6b280d99cc053de94e77ad7 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 17 Aug 2018 21:21:29 +0200 Subject: [PATCH] re-number the lines during copying, required by nupa_copy() --- src/frontend/subckt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/subckt.c b/src/frontend/subckt.c index 07c541d92..aa5033300 100644 --- a/src/frontend/subckt.c +++ b/src/frontend/subckt.c @@ -728,7 +728,7 @@ struct card * inp_deckcopy_oc(struct card *deck) { struct card *d = NULL, *nd = NULL; - int skip_control = 0; + int skip_control = 0, i = 0; while (deck) { /* exclude any command inside .control ... .endc */ @@ -753,7 +753,8 @@ inp_deckcopy_oc(struct card *deck) else { nd = d = TMALLOC(struct card, 1); } - d->linenum = deck->linenum; + d->linenum_orig = deck->linenum; + d->linenum = i++; d->line = copy(deck->line); if (deck->error) d->error = copy(deck->error);