diff options
| author | dgp <dgp@users.sourceforge.net> | 2022-09-29 19:08:50 (GMT) |
|---|---|---|
| committer | dgp <dgp@users.sourceforge.net> | 2022-09-29 19:08:50 (GMT) |
| commit | dcb351dbe08801aefd358a2496d64298a2652c14 (patch) | |
| tree | a8145e92aaddf90c828f98b4cfb0cc9a6b25ec99 | |
| parent | 414f4c9f7c689e4c1cba2c4f568db0ff3b5df688 (diff) | |
| parent | bec96305308d0c234215d25b194f1ff8417dc8b4 (diff) | |
| download | tcl-dcb351dbe08801aefd358a2496d64298a2652c14.zip tcl-dcb351dbe08801aefd358a2496d64298a2652c14.tar.gz tcl-dcb351dbe08801aefd358a2496d64298a2652c14.tar.bz2 | |
merge 8.7
| -rw-r--r-- | doc/Number.3 | 8 | ||||
| -rw-r--r-- | generic/tclExecute.c | 2 | ||||
| -rw-r--r-- | tests/lseq.test | 10 |
3 files changed, 15 insertions, 5 deletions
diff --git a/doc/Number.3 b/doc/Number.3 index 588171e..65a1332 100644 --- a/doc/Number.3 +++ b/doc/Number.3 @@ -74,10 +74,10 @@ in \fIinterp\fR. If the examined value is recognized as a number, both routines return \fBTCL_OK\fR, and use the pointer arguments \fIclientDataPtr\fR and \fItypePtr\fR (which may not be NULL) to report information the -caller can use to retrieve the numeric representation. In all cases, -both routines write to *\fIclientDataPtr\fR a pointer to the internal -storage location where Tcl holds the numeric value. When that -internal storage is of type \fBdouble\fR +caller can use to retrieve the numeric representation. Both routines +write to *\fIclientDataPtr\fR a pointer to the internal storage location +where Tcl holds the converted numeric value. When that internal storage +is of type \fBdouble\fR diff --git a/generic/tclExecute.c b/generic/tclExecute.c index ab91919..619df83 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -4938,7 +4938,7 @@ TEBCresume( /* Decode end-offset index values. */ - index = TclIndexDecode(opnd, length); + index = TclIndexDecode(opnd, length-1); /* Compute value @ index */ if (index >= 0 && index < length) { diff --git a/tests/lseq.test b/tests/lseq.test index e05b32d..518a7bb 100644 --- a/tests/lseq.test +++ b/tests/lseq.test @@ -489,9 +489,19 @@ test lseq-4.4 {lseq corner case} -body { lappend res $s $e } eval $tcmd +} -cleanup { + unset res } -result {0 10 1 {max length of a Tcl list exceeded} 1 {max length of a Tcl list exceeded} 0 10 0 2147483638} +# Ticket 99e834bf33 - lseq, lindex end off by one + +test lseq-4.5 {lindex off by one} -body { + lappend res [eval {lindex [lseq 1 4] end}] + lappend res [eval {lindex [lseq 1 4] end-1}] +} -result {4 3} + + # cleanup ::tcltest::cleanupTests return |
