diff options
author | ericm <ericm> | 2000-06-27 17:15:58 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-06-27 17:15:58 (GMT) |
commit | e198ab3d290731e5e38d1370f1a3d47870765892 (patch) | |
tree | 273860f6c19951a1ffd5ff70e05c32d829febc4c | |
parent | 2d36140194d24b7083dad675be4377b8f946974d (diff) | |
download | tk-e198ab3d290731e5e38d1370f1a3d47870765892.zip tk-e198ab3d290731e5e38d1370f1a3d47870765892.tar.gz tk-e198ab3d290731e5e38d1370f1a3d47870765892.tar.bz2 |
* generic/tkMenu.c (DeleteMenuCloneEntries): Applied fix from
[Bug: 5275], which corrected a segfault-causing indexing problem
when deleting entries from torn-off menus.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tkMenu.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2000-06-27 Eric Melski <ericm@scriptics.com> + + * generic/tkMenu.c (DeleteMenuCloneEntries): Applied fix from + [Bug: 5275], which corrected a segfault-causing indexing problem + when deleting entries from torn-off menus. + 2000-06-22 Eric Melski <ericm@ajubasolutions.com> * doc/getOpenFile.n: Updated with information about -multiple. diff --git a/generic/tkMenu.c b/generic/tkMenu.c index b3f906d..89525ed 100644 --- a/generic/tkMenu.c +++ b/generic/tkMenu.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMenu.c,v 1.6 2000/02/10 08:52:35 hobbs Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.7 2000/06/27 17:15:58 ericm Exp $ */ /* @@ -3403,7 +3403,7 @@ DeleteMenuCloneEntries(menuPtr, first, last) } for (i = last + 1; i < menuListPtr->numEntries; i++) { menuListPtr->entries[i - numDeleted] = menuListPtr->entries[i]; - menuListPtr->entries[i - numDeleted]->index = i; + menuListPtr->entries[i - numDeleted]->index = i - numDeleted; } menuListPtr->numEntries -= numDeleted; if (menuListPtr->numEntries == 0) { |