summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index b87b5d6..a3bfc09 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3706,6 +3706,8 @@ GetEndOffsetFromObj(
* as endValue will have to adjust accordingly.
*/
*widePtr = (endValue == -1) ? WIDE_MAX : endValue + 1;
+ } else if (offset == WIDE_MIN) {
+ *widePtr = (endValue == -1) ? WIDE_MIN : -1;
} else if (offset < 0) {
/* end-(n-1) - Different signs, sum cannot overflow */
*widePtr = endValue + offset + 1;