summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdIL.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2016-04-04 18:00:48 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2016-04-04 18:00:48 (GMT)
commit6cefed89423de9c1a0b46d10dafa09a42cf4bbbf (patch)
tree1404cce7c7afd4bdd7d3ee80393f1996f8654ff8 /generic/tclCmdIL.c
parent1fa8d8f8ed23d263b17cb2315eaf7de803690ee4 (diff)
parentdedc1d86a28c562377215bc2d0bf10e75ed00f1d (diff)
downloadtcl-potential_incompatibility.zip
tcl-potential_incompatibility.tar.gz
tcl-potential_incompatibility.tar.bz2
[47ac84309b] Clear up a bunch of problems with [lreplace]. It now does nothing more gracefully, and properly ensures that the compiled and interpreted versions work the same. Thanks to aspect for his work on this.potential_incompatibility
Diffstat (limited to 'generic/tclCmdIL.c')
-rw-r--r--generic/tclCmdIL.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index 739dca9..0d35397 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -2755,7 +2755,7 @@ Tcl_LreplaceObjCmd(
* (to allow for replacing the last elem).
*/
- if ((first >= listLen) && (listLen > 0)) {
+ if ((first > listLen) && (listLen > 0)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"list doesn't contain element %s", TclGetString(objv[2])));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "LREPLACE", "BADIDX",