summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-18 15:52:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-01-18 15:52:13 (GMT)
commitae78b892336fb5325a124506f2de9e283760857c (patch)
tree04dd21e507e2eece455ffffefbeef87056e04c42 /generic/tclExecute.c
parentb563c159d7f63f0a4ca1e9190ec4111d5d4908d9 (diff)
parentf97560a94963b378ccc5b75e5dbc2949eca30b9f (diff)
downloadtcl-ae78b892336fb5325a124506f2de9e283760857c.zip
tcl-ae78b892336fb5325a124506f2de9e283760857c.tar.gz
tcl-ae78b892336fb5325a124506f2de9e283760857c.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c12
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);