lack of proper Tcl quoting of values in results
Brought to you by:
alsterg
The various get, getnext, walk, etc. commands return on success a Tcl list of values which is built by hand by explicitly surrounding values with curly braces.
Said values are not quoted, possibly resulting in invalid Tcl lists when a value contains curly braces.
A way to fix this could be using Tcl_DStringAppendElement() instead of Tcl_DStringAppend() when appending values to the result: it takes care of quoting values, inserting a separator from previous elements and surrounding the values with curly braces if needed (basically, it is equivalent to a "lappend Result $value").