diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-24 11:01:07 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-24 11:01:07 (GMT) |
commit | bc8c2ad47a5fc72622020a829493e50e449bd040 (patch) | |
tree | 788b0c3fe99eccac4fab9b0d598f466d163e5855 /generic/tclUtil.c | |
parent | 511e85013ac111a96845721348abc019321ab15e (diff) | |
download | tcl-bc8c2ad47a5fc72622020a829493e50e449bd040.zip tcl-bc8c2ad47a5fc72622020a829493e50e449bd040.tar.gz tcl-bc8c2ad47a5fc72622020a829493e50e449bd040.tar.bz2 |
Fix another bug in Tcl_GetIntForIndex() (demonstrated by the new testcases from the previous commit)
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r-- | generic/tclUtil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 10153fb..e29afcc 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -3699,7 +3699,7 @@ Tcl_GetIntForIndex( { Tcl_WideInt wide; - if (GetWideForIndex(interp, objPtr, (size_t)(endValue + 1) - 1, &wide) == TCL_ERROR) { + if (GetWideForIndex(interp, objPtr, endValue, &wide) == TCL_ERROR) { return TCL_ERROR; } if (indexPtr != NULL) { |