diff --git a/src/actions.c b/src/actions.c index e12f1d4d..e573c145 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1712,8 +1712,10 @@ int descend_schematic(int instnumber) my_strdup2(_ALLOC_ID_, &single_n, find_nth(net_node, ",", ((inst_number - 1) * mult + k - 1) % net_mult + 1)); single_n_ptr = single_n; - if(single_n_ptr[0] == '#') single_n_ptr++; - + if(single_n_ptr[0] == '#') { + my_mstrcat(_ALLOC_ID_, &single_n, "[", my_itoa((inst_mult - inst_number + 1) * mult - k), "]", NULL); + single_n_ptr = single_n + 1; + } str_hash_lookup(&xctx->portmap[xctx->currsch + 1], single_p, single_n_ptr, XINSERT); dbg(1, "descend_schematic(): %s: %s ->%s\n", xctx->inst[n].instname, single_p, single_n_ptr); } diff --git a/src/expandlabel.y b/src/expandlabel.y index 1655c03c..bea0bad7 100644 --- a/src/expandlabel.y +++ b/src/expandlabel.y @@ -278,7 +278,6 @@ list: B_NAME { my_free(_ALLOC_ID_, &$1); $$.m = 1; } - | list B_NAME { dbg(3, "yyparse(): list B_NAME, $2=%s\n", $2); $$.str = expandlabel_strcat($1.str, $2); @@ -286,7 +285,6 @@ list: B_NAME { my_free(_ALLOC_ID_, &$2); $$.m = $1.m; } - | list '*' B_NUM { dbg(3, "yyparse(): list * B_NUM\n"); @@ -548,12 +546,5 @@ index_nobracket: B_IDXNUM B_DOUBLEDOT B_IDXNUM B_DOUBLEDOT B_IDXNUM B_DOUBLEDOT check_idx(&$$, ++$$[0]); $$[$$[0]]=$3; } -/* - | B_IDXNUM ',' index_nobracket - { - if($$==NULL) dbg(0, "null\n"); - } -*/ - %%