summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-30 12:57:27 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-03-30 12:57:27 (GMT)
commitdf008ca3249de1390d881ced2ec3a0b95425d203 (patch)
treec57cb743901e5362565beba04f52879ba2417af8 /generic
parent6cf1f7bacfe7e787c6468eed2b41194dd1c6e333 (diff)
parent77ccaefbb1482145de9b9276979318e88b9e542e (diff)
downloadtcl-df008ca3249de1390d881ced2ec3a0b95425d203.zip
tcl-df008ca3249de1390d881ced2ec3a0b95425d203.tar.gz
tcl-df008ca3249de1390d881ced2ec3a0b95425d203.tar.bz2
merge trunk
Diffstat (limited to 'generic')
-rw-r--r--generic/tclCompCmdsGR.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index 87ed745..9f430ea 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -1488,8 +1488,18 @@ TclCompileLreplaceCmd(
return TCL_ERROR;
}
- if(idx2 != INDEX_END && idx2 >= 0 && idx2 < idx1) {
- idx2 = idx1-1;
+ /*
+ * Compilation fails when one index is end-based but the other isn't.
+ * Fixing this will require more bytecodes, but this is a workaround for
+ * now. [Bug 47ac84309b]
+ */
+
+ if ((idx1 <= INDEX_END) != (idx2 <= INDEX_END)) {
+ return TCL_ERROR;
+ }
+
+ if (idx2 != INDEX_END && idx2 >= 0 && idx2 < idx1) {
+ idx2 = idx1 - 1;
}
/*