diff options
| -rw-r--r-- | generic/tclExecute.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index bb96a9e..cd78adf 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5237,8 +5237,12 @@ TEBCresume( /* Every range of an empty list is an empty list */ if (objc == 0) { - TRACE_APPEND(("\n")); - NEXT_INST_F(9, 0, 0); + /* avoid return of not canonical list (e. g. spaces in string repr.) */ + if (ListObjIsCanonical(valuePtr)) { + TRACE_APPEND(("\n")); + NEXT_INST_F(9, 0, 0); + } + goto emptyList; } /* Decode index value operands. */ |
