From 4517ff3b8713cb9bd0b61ad72f27eafe18f9f510 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Wed, 12 Feb 2025 23:26:00 +0100 Subject: [PATCH] fix netlist error if in symbol attributes model="xxx@name" is given, @name was looked up in symbol template instead of again in instance properties. --- src/token.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/token.c b/src/token.c index aa4d5da5..bf4c2049 100644 --- a/src/token.c +++ b/src/token.c @@ -2411,7 +2411,8 @@ int print_spice_element(FILE *fd, int inst) * if instance has VHI=VHI, format string has VHI=@VHI, and symbol template has VHI=3 * we do not want token @VHI to resolve to 3, but stop at VHI as specified in instance */ if(strchr(val, '@')) { - my_strdup2(_ALLOC_ID_, &val, translate3(val, 0, template, NULL, NULL, NULL)); + my_strdup2(_ALLOC_ID_, &val, + translate3(val, 0, xctx->inst[inst].prop_ptr, parent_prop_ptr, template, NULL)); } /* nmos instance format string: @model --> @modeln */ dbg(1, "print_spice_element(): 1st round: val: |%s|\n", val);