summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2007-05-05 07:33:08 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2007-05-05 07:33:08 (GMT)
commitc2492d41c1c77e3d9bbe03e33fa20b7e60092e1f (patch)
tree832106663fe26f31ab46f3cb0d7b220e8f91aa74 /win
parentb721e1f32dc43b3626d65e9211ae661af0d969f3 (diff)
downloadtk-c2492d41c1c77e3d9bbe03e33fa20b7e60092e1f.zip
tk-c2492d41c1c77e3d9bbe03e33fa20b7e60092e1f.tar.gz
tk-c2492d41c1c77e3d9bbe03e33fa20b7e60092e1f.tar.bz2
Slight simplification
Diffstat (limited to 'win')
-rw-r--r--win/tkWinMenu.c7
1 files 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;