summaryrefslogtreecommitdiffstats
path: root/generic/tclExecute.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2018-03-10 14:44:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2018-03-10 14:44:05 (GMT)
commite7a86d967ca214c536410f0d3c4b35fcf675fbc0 (patch)
tree7f67e0fd1fb5dbb1173445c14faa173d430d44b2 /generic/tclExecute.c
parent6fce39545c66c1b7d03c888c57dfab064288444f (diff)
downloadtcl-e7a86d967ca214c536410f0d3c4b35fcf675fbc0.zip
tcl-e7a86d967ca214c536410f0d3c4b35fcf675fbc0.tar.gz
tcl-e7a86d967ca214c536410f0d3c4b35fcf675fbc0.tar.bz2
Use LIST_MAX instead of computing an end index.
Diffstat (limited to 'generic/tclExecute.c')
-rw-r--r--generic/tclExecute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index 151a899..839f6f4 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5282,8 +5282,8 @@ TEBCresume(
objResultPtr = Tcl_NewListObj(toIdx-fromIdx+1, objv+fromIdx);
} else {
if (toIdx != objc - 1) {
- Tcl_ListObjReplace(NULL, valuePtr, toIdx + 1,
- objc - 1 - toIdx, 0, NULL);
+ Tcl_ListObjReplace(NULL, valuePtr, toIdx + 1, LIST_MAX,
+ 0, NULL);
}
Tcl_ListObjReplace(NULL, valuePtr, 0, fromIdx, 0, NULL);
TRACE_APPEND(("%.30s\n", O2S(valuePtr)));