From 24844b3d4c8c00d447293ad93805e247fe6208a4 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Mon, 22 Jan 2024 18:53:04 +0100 Subject: [PATCH] print_spice_element(): do 2nd level translate() only on `device_model` tokens whose value contains @variables. --- src/token.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/token.c b/src/token.c index d241fc05..b4dcdf7c 100644 --- a/src/token.c +++ b/src/token.c @@ -2151,7 +2151,7 @@ int print_spice_element(FILE *fd, int inst) dbg(1, "print_spice_element(): token: |%s|\n", token); my_strdup2(_ALLOC_ID_, &val, get_tok_value(xctx->inst[inst].prop_ptr, token+1, 0)); value = val; - if(strchr(value, '@')) value = translate(inst, val); + if(!strcmp(token + 1, "device_model") && strchr(value, '@')) value = translate(inst, val); tok_val_len = strlen(value); if(!strcmp(token, "@spiceprefix")) { my_realloc(_ALLOC_ID_, &spiceprefixtag, tok_val_len+22);