print_spice_element(): do 2nd level translate() only on `device_model` tokens whose value contains @variables.

This commit is contained in:
stefan schippers 2024-01-22 18:53:04 +01:00
parent 7d93b7abac
commit 24844b3d4c
1 changed files with 1 additions and 1 deletions

View File

@ -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);