diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-03 08:51:51 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2021-02-03 08:51:51 (GMT) |
commit | 5eb6f18dd83f41569f38f47701775e57e9699481 (patch) | |
tree | 205fdab202fa27a1a465cc99c70dfbbf10e0e46a /generic/tkMenu.c | |
parent | da4a9e05802dc6decc27f9440eb9b4570ca716c6 (diff) | |
parent | 06420ba2fed328cf5559b51d715c8554ff00c69c (diff) | |
download | tk-5eb6f18dd83f41569f38f47701775e57e9699481.zip tk-5eb6f18dd83f41569f38f47701775e57e9699481.tar.gz tk-5eb6f18dd83f41569f38f47701775e57e9699481.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tkMenu.c')
-rw-r--r-- | generic/tkMenu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 72a96c6..2fa5e79 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -2130,7 +2130,7 @@ GetMenuIndex( if (TkGetIntForIndex(objPtr, menuPtr->numEntries - 1, lastOK, indexPtr) == TCL_OK) { /* TCL_INDEX_NONE is only accepted if it does not result from a negative number */ if (*indexPtr != TCL_INDEX_NONE || Tcl_GetString(objPtr)[0] != '-') { - if (*indexPtr >= menuPtr->numEntries) { + if (*indexPtr + 1 >= menuPtr->numEntries + 1) { *indexPtr = menuPtr->numEntries - ((lastOK) ? 0 : 1); } return TCL_OK; |