diff options
author | hobbs <hobbs> | 2006-05-25 23:50:16 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2006-05-25 23:50:16 (GMT) |
commit | a0ff869af921c401c6c893abe8de8a6fb7a6cfbb (patch) | |
tree | 5197db83e6ff690ca2e85f7b2750803ecdd9d7d2 /generic | |
parent | ebb151d964a0d293113369b111cd8c26c4edf905 (diff) | |
download | tk-a0ff869af921c401c6c893abe8de8a6fb7a6cfbb.zip tk-a0ff869af921c401c6c893abe8de8a6fb7a6cfbb.tar.gz tk-a0ff869af921c401c6c893abe8de8a6fb7a6cfbb.tar.bz2 |
* generic/tkMenu.c (DeleteMenuCloneEntries): Modify entry index
changes to work around VC6 optimization bug. [Bug 1224330]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkMenu.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/generic/tkMenu.c b/generic/tkMenu.c index 37644a4..e87b072 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.35 2006/04/05 20:59:03 hobbs Exp $ + * RCS: @(#) $Id: tkMenu.c,v 1.36 2006/05/25 23:50:16 hobbs Exp $ */ /* @@ -3437,7 +3437,7 @@ DeleteMenuCloneEntries( int last) /* The zero-based last entry. */ { TkMenu *menuListPtr; - int numDeleted, i; + int numDeleted, i, j; numDeleted = last + 1 - first; for (menuListPtr = menuPtr->masterMenuPtr; menuListPtr != NULL; @@ -3447,8 +3447,9 @@ DeleteMenuCloneEntries( DestroyMenuEntry); } for (i = last + 1; i < menuListPtr->numEntries; i++) { - menuListPtr->entries[i - numDeleted] = menuListPtr->entries[i]; - menuListPtr->entries[i - numDeleted]->index = i - numDeleted; + j = i - numDeleted; + menuListPtr->entries[j] = menuListPtr->entries[i]; + menuListPtr->entries[j]->index = j; } menuListPtr->numEntries -= numDeleted; if (menuListPtr->numEntries == 0) { |