summaryrefslogtreecommitdiffstats
path: root/win/tkWinMenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'win/tkWinMenu.c')
-rw-r--r--win/tkWinMenu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 67894c7..22e84cb 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -511,7 +511,7 @@ GetEntryText(
: Tcl_GetString(mePtr->accelPtr);
const char *p, *next;
Tcl_DString itemString;
- int ch;
+ Tcl_UniChar ch = 0;
/*
* We have to construct the string with an ampersand preceeding the
@@ -528,16 +528,17 @@ GetEntryText(
if (*p == '&') {
Tcl_DStringAppend(&itemString, "&", 1);
}
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
Tcl_DStringAppend(&itemString, p, (int) (next - p));
}
+ ch = 0;
if (mePtr->accelLength > 0) {
Tcl_DStringAppend(&itemString, "\t", 1);
for (p = accel, i = 0; *p != '\0'; i++, p = next) {
if (*p == '&') {
Tcl_DStringAppend(&itemString, "&", 1);
}
- next = p + TkUtfToUniChar(p, &ch);
+ next = p + Tcl_UtfToUniChar(p, &ch);
Tcl_DStringAppend(&itemString, p, (int) (next - p));
}
}