From 7d2875649f6a1b55f00cf9f274a79f7e0d804ee2 Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Mon, 23 Nov 2020 02:15:34 +0100 Subject: [PATCH] fix $tok_list --> [list $tok_list] in text_line proc, so weird input does not cause issues in token parsing --- src/token.c | 1 + src/xschem.tcl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/token.c b/src/token.c index f21cb86f..badbe860 100644 --- a/src/token.c +++ b/src/token.c @@ -416,6 +416,7 @@ const char *list_tokens(const char *s, int with_quotes) } sizetok = CADCHUNKALLOC; my_realloc(451, &token, sizetok); + token[0] = '\0'; while(1) { c=*s++; space=SPACE(c) ; diff --git a/src/xschem.tcl b/src/xschem.tcl index d0a6be01..fa717d41 100644 --- a/src/xschem.tcl +++ b/src/xschem.tcl @@ -2420,7 +2420,7 @@ proc text_line {txtlabel clear {preserve_disabled disabled} } { } label .dialog.f1.r4 -text { Edit Attr:} if { [ info tclversion] > 8.4} { - ttk::combobox .dialog.f1.r5 -values $tok_list -textvariable selected_tok -width 14 + ttk::combobox .dialog.f1.r5 -values [list $tok_list] -textvariable selected_tok -width 14 } checkbutton .dialog.f0.l2 -text "preserve unchanged props" -variable preserve_unchanged_attrs -state $preserve_disabled