diff --git a/src/actions.c b/src/actions.c index 9741dd52..ae5d70b1 100644 --- a/src/actions.c +++ b/src/actions.c @@ -1942,7 +1942,7 @@ void get_additional_symbols(int what) char symbol_base_sch[PATH_MAX] = ""; /* copy instance based *_sym_def attributes to symbol */ - my_strdup(_ALLOC_ID_, &spice_sym_def, get_tok_value(xctx->inst[i].prop_ptr,"spice_sym_def",4)); + my_strdup(_ALLOC_ID_, &spice_sym_def, get_tok_value(xctx->inst[i].prop_ptr,"spice_sym_def",6)); my_strdup(_ALLOC_ID_, &verilog_sym_def, get_tok_value(xctx->inst[i].prop_ptr,"verilog_sym_def",4)); my_strdup(_ALLOC_ID_, &vhdl_sym_def, get_tok_value(xctx->inst[i].prop_ptr,"vhdl_sym_def",4)); my_strdup2(_ALLOC_ID_, &sch, tcl_hook2( diff --git a/src/token.c b/src/token.c index 9116c953..899de2d9 100644 --- a/src/token.c +++ b/src/token.c @@ -1826,7 +1826,7 @@ static int has_included_subcircuit(int inst, int symbol, char **result) int ret = 0; - my_strdup2(_ALLOC_ID_, &spice_sym_def, get_tok_value(xctx->inst[inst].prop_ptr, "spice_sym_def", 0)); + my_strdup2(_ALLOC_ID_, &spice_sym_def, get_tok_value(xctx->inst[inst].prop_ptr, "spice_sym_def", 2)); if(!spice_sym_def[0]) { my_strdup2(_ALLOC_ID_, &spice_sym_def, get_tok_value(xctx->sym[symbol].prop_ptr, "spice_sym_def", 0)); } @@ -1849,8 +1849,9 @@ static int has_included_subcircuit(int inst, int symbol, char **result) translated_sym_def = translate3(spice_sym_def, 1, xctx->inst[inst].prop_ptr, templ, symname_attr); - strtolower(symname); dbg(1, "has_included_subcircuit(): translated_sym_def=%s\n", translated_sym_def); + dbg(1, "has_included_subcircuit(): symname=%s\n", symname); + strtolower(symname); tclvareval("has_included_subcircuit {", get_cell(symname, 0), "} {", translated_sym_def, "}", NULL); my_free(_ALLOC_ID_, &templ);