expandlabel(): do bus_char substitution even if taking the shortcut

This commit is contained in:
stefan schippers 2023-10-13 00:04:58 +02:00
parent ae58077447
commit c86d48f321
1 changed files with 4 additions and 0 deletions

View File

@ -105,6 +105,10 @@ const char *expandlabel(const char *s, int *m)
if(!strpbrk(s, "*,.:")) { /* shortcut: nothing to parse / expand */
*m = 1;
my_strdup2(_ALLOC_ID_, &dest_string.str, s);
if(xctx->netlist_type == CAD_SPICE_NETLIST && bus_char[0] && bus_char[1]) {
str_char_replace(dest_string.str, '[', bus_char[0]);
str_char_replace(dest_string.str, ']', bus_char[1]);
}
return dest_string.str;
}
buf=yy_scan_string(s);