From c86d48f321be3ec1935c2d995caabe2b853bc946 Mon Sep 17 00:00:00 2001 From: stefan schippers Date: Fri, 13 Oct 2023 00:04:58 +0200 Subject: [PATCH] expandlabel(): do bus_char substitution even if taking the shortcut --- src/parselabel.l | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/parselabel.l b/src/parselabel.l index 7ef66f77..90012214 100644 --- a/src/parselabel.l +++ b/src/parselabel.l @@ -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);