summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-20 20:19:48 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-20 20:19:48 (GMT)
commited48111ddf678e47562b98902505abac5d577e22 (patch)
treefceedeb62daad56de804bfeb4e00743a314037f0 /generic
parente6769f61943702e7199b3c77bf956622e813ef5b (diff)
parentaaf545353c995502c38a2a33da5af74eeaa66b7a (diff)
downloadtcl-ed48111ddf678e47562b98902505abac5d577e22.zip
tcl-ed48111ddf678e47562b98902505abac5d577e22.tar.gz
tcl-ed48111ddf678e47562b98902505abac5d577e22.tar.bz2
[32b6159246] Accept aspect patch for broken [lreplace] bytecode.
No more [lreplace {1 2 3} 2 0] => 1 2 2 3
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmdsGR.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index e2fb43d..b77c43c 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -1501,6 +1501,10 @@ TclCompileLreplaceCmd(
return TCL_ERROR;
}
+ if(idx2 != INDEX_END && idx2 < idx1) {
+ idx2 = idx1-1;
+ }
+
/*
* Work out what this [lreplace] is actually doing.
*/