From 9abb61d6ac811fe813250e5017da48e677412c68 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 4 Jun 2021 11:47:06 +0200 Subject: [PATCH] Bug fix for %i(node1) in an A instance. Don't do i() replacement in an A instance as shown above. --- src/frontend/inpcom.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/frontend/inpcom.c b/src/frontend/inpcom.c index 2d689d79c..6af0ffa82 100644 --- a/src/frontend/inpcom.c +++ b/src/frontend/inpcom.c @@ -7455,9 +7455,13 @@ static void inp_meas_current(struct card *deck) /* we have found it, but not (in error) at the beginning of the * line */ if (s && s > v) { - /* '{' if at beginning of expression, '=' possible in B-line - */ - if (is_arith_char(s[-1]) || s[-1] == '{' || s[-1] == '=' || + /* %i( may be part of the node definition in a XSPICE instance, so skip it here */ + if (*curr_line == 'a' && s[-1] == '%') { + s++; + continue; + } + /* '{' if at beginning of expression, '=' possible in B-line */ + else if (is_arith_char(s[-1]) || s[-1] == '{' || s[-1] == '=' || isspace_c(s[-1])) { s += 2; if (*s == 'v') {