From 12b8f6f81712c5c8abb8ac9cd6e60b4abe974f1c Mon Sep 17 00:00:00 2001 From: chengyemao Date: Thu, 28 Apr 2005 02:40:19 +0000 Subject: Fixed bug # 1189939 --- win/tkWinMenu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 766e3c3..a33ddb8 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkWinMenu.c,v 1.43 2005/01/18 15:24:18 chengyemao Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.44 2005/04/28 02:40:19 chengyemao Exp $ */ #define OEMRESOURCE @@ -1239,8 +1239,8 @@ TkWinHandleMenuEvent(phwnd, pMessage, pwParam, plParam, plResult) if (menuPtr != NULL) { long entryIndex = LOWORD(*pwParam); mePtr = NULL; - if (flags != 0xFFFF && entryIndex < menuPtr->numEntries) { - if (flags & MF_POPUP) { + if (flags != 0xFFFF) { + if ((flags & MF_POPUP) && (entryIndex < menuPtr->numEntries)) { mePtr = menuPtr->entries[entryIndex]; } else { hashEntryPtr = Tcl_FindHashEntry( -- cgit v0.12