From c2492d41c1c77e3d9bbe03e33fa20b7e60092e1f Mon Sep 17 00:00:00 2001 From: dkf Date: Sat, 5 May 2007 07:33:08 +0000 Subject: Slight simplification --- win/tkWinMenu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c index 08b143f..5852d58 100644 --- a/win/tkWinMenu.c +++ b/win/tkWinMenu.c @@ -10,7 +10,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.55 2007/02/23 14:15:34 dkf Exp $ + * RCS: @(#) $Id: tkWinMenu.c,v 1.56 2007/05/05 07:33:08 dkf Exp $ */ #define OEMRESOURCE @@ -1121,9 +1121,10 @@ TkWinHandleMenuEvent( Tcl_GetUnicodeFromObj(labelPtr, &len); if (underline < len) { char *label = Tcl_GetString(labelPtr); + char underlined = *Tcl_UtfAtIndex(label, underline); - if (CharUpper((LPTSTR) menuChar) == CharUpper((LPTSTR) - *Tcl_UtfAtIndex(label, underline))) { + if (CharUpper((LPTSTR) menuChar) == + CharUpper((LPTSTR) underlined)) { *plResult = (2 << 16) | i; returnResult = 1; break; -- cgit v0.12