diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-17 21:51:19 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-03-17 21:51:19 (GMT) |
commit | 84d93a6e998f4394ae62cec0ea81fa96287a8d7a (patch) | |
tree | 71675efba3491d878f3c179eb5e2f2a3630b3c15 /generic | |
parent | 1f915d51ed45d9f68cb4933a1c31b68c254ed242 (diff) | |
download | tk-84d93a6e998f4394ae62cec0ea81fa96287a8d7a.zip tk-84d93a6e998f4394ae62cec0ea81fa96287a8d7a.tar.gz tk-84d93a6e998f4394ae62cec0ea81fa96287a8d7a.tar.bz2 |
Follow-up to [d9bda1d1]: Clamp "listbox index" values between -1 and (maximum) end+1 = the number of elements, which point to one more than the last emlement.... that's what other GUI elements are really doing too. Duh.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkListbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkListbox.c b/generic/tkListbox.c index c121acb..d456a13 100644 --- a/generic/tkListbox.c +++ b/generic/tkListbox.c @@ -2799,7 +2799,7 @@ GetListboxIndex( if (*indexPtr < -1) { *indexPtr = -1; } else if (*indexPtr > listPtr->nElements) { - *indexPtr = listPtr->nElements + (endIsSize ? 1 : 0); + *indexPtr = listPtr->nElements; } return TCL_OK; } |