summaryrefslogtreecommitdiffstats
path: root/generic/tclCompCmdsGR.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclCompCmdsGR.c')
-rw-r--r--generic/tclCompCmdsGR.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c
index b77c43c..8d8f2cc 100644
--- a/generic/tclCompCmdsGR.c
+++ b/generic/tclCompCmdsGR.c
@@ -1501,7 +1501,7 @@ TclCompileLreplaceCmd(
return TCL_ERROR;
}
- if(idx2 != INDEX_END && idx2 < idx1) {
+ if(idx2 != INDEX_END && idx2 >= 0 && idx2 < idx1) {
idx2 = idx1-1;
}