diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-18 15:52:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-18 15:52:13 (GMT) |
commit | ae78b892336fb5325a124506f2de9e283760857c (patch) | |
tree | 04dd21e507e2eece455ffffefbeef87056e04c42 /generic/tclExecute.c | |
parent | b563c159d7f63f0a4ca1e9190ec4111d5d4908d9 (diff) | |
parent | f97560a94963b378ccc5b75e5dbc2949eca30b9f (diff) | |
download | tcl-ae78b892336fb5325a124506f2de9e283760857c.zip tcl-ae78b892336fb5325a124506f2de9e283760857c.tar.gz tcl-ae78b892336fb5325a124506f2de9e283760857c.tar.bz2 |
Merge 8.6
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r-- | generic/tclExecute.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 8301627..e2ac905 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -5370,7 +5370,11 @@ TEBCresume( } CACHE_STACK_INFO(); - objResultPtr = Tcl_GetRange(OBJ_AT_DEPTH(2), fromIdx, toIdx); + if (toIdx < 0) { + TclNewObj(objResultPtr); + } else { + objResultPtr = Tcl_GetRange(OBJ_AT_DEPTH(2), fromIdx, toIdx); + } TRACE_APPEND(("\"%.30s\"\n", O2S(objResultPtr))); NEXT_INST_V(1, 3, 1); @@ -5407,7 +5411,11 @@ TEBCresume( fromIdx = TCL_INDEX_START; } fromIdx = TclIndexDecode(fromIdx, length - 1); - objResultPtr = Tcl_GetRange(valuePtr, fromIdx, toIdx); + if (toIdx < 0) { + TclNewObj(objResultPtr); + } else { + objResultPtr = Tcl_GetRange(valuePtr, fromIdx, toIdx); + } } TRACE_APPEND(("%.30s\n", O2S(objResultPtr))); NEXT_INST_F(9, 1, 1); |