diff --git a/src/editprop.c b/src/editprop.c index ee820feb..cfd9b8c8 100644 --- a/src/editprop.c +++ b/src/editprop.c @@ -379,10 +379,12 @@ char *strtoupper(char* s) { void set_inst_prop(int i) { - char *ptr; + char *ptr = NULL; char *tmp = NULL; - ptr = (xctx.inst[i].ptr+ xctx.sym)->templ; + my_strdup(104, &ptr, (xctx.inst[i].ptr+ xctx.sym)->templ); + /* my_strdup(104, &ptr, translate(i, (xctx.inst[i].ptr+ xctx.sym)->templ)); */ + /* tcl_hook(&ptr); */ dbg(1, "set_inst_prop(): i=%d, name=%s, prop_ptr = %s, template=%s\n", i, xctx.inst[i].name, xctx.inst[i].prop_ptr, ptr); my_strdup(69, &xctx.inst[i].prop_ptr, ptr); @@ -392,6 +394,7 @@ void set_inst_prop(int i) new_prop_string(i, tmp, 0, dis_uniq_names); my_free(724, &tmp); } + my_free(330, &ptr); } void edit_rect_property(void) diff --git a/src/xschem.h b/src/xschem.h index c80560a2..fd127578 100644 --- a/src/xschem.h +++ b/src/xschem.h @@ -914,6 +914,7 @@ extern const char *tcleval(const char str[]); extern const char *tclresult(void); extern const char *tclgetvar(const char *s); extern void tclsetvar(const char *s, const char *value); +extern void tcl_hook(char **res); extern void statusmsg(char str[],int n); extern void place_text(int draw_text, double mx, double my); extern void init_inst_iterator(double x1, double y1, double x2, double y2);