diff options
| -rw-r--r-- | generic/tclUtil.c | 2 | ||||
| -rw-r--r-- | tests/indexObj.test | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9c1bb93..0119243 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3972,8 +3972,6 @@ GetEndOffsetFromObj( if (offset == WIDE_MAX) { *widePtr = (endValue == -1) ? WIDE_MAX : endValue + 1; - } else if (offset == WIDE_MIN) { - *widePtr = -1; } else if (endValue == -1) { *widePtr = offset; } else if (offset < 0) { diff --git a/tests/indexObj.test b/tests/indexObj.test index eec5485..29fc616 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -238,6 +238,12 @@ test indexObj-8.16 {Tcl_GetIntForIndex integer} testgetintforindex { test indexObj-8.17 {Tcl_GetIntForIndex integer} testgetintforindex { testgetintforindex -2 -1 } -2147483648 +test indexObj-8.18 {Tcl_GetIntForIndex n-m} testgetintforindex { + testgetintforindex 2-3 -1 +} -2147483648 +test indexObj-8.19 {Tcl_GetIntForIndex n-m} testgetintforindex { + testgetintforindex 2-3 0 +} -1 # cleanup ::tcltest::cleanupTests |
