fix $tok_list --> [list $tok_list] in text_line proc, so weird input does not cause issues in token parsing

This commit is contained in:
Stefan Frederik 2020-11-23 02:15:34 +01:00
parent d93826f61c
commit 7d2875649f
2 changed files with 2 additions and 1 deletions

View File

@ -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) ;

View File

@ -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