summaryrefslogtreecommitdiffstats
path: root/win/tkWinKey.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-16 12:17:59 (GMT)
commit7a5d64437977cc14b7b79e336b3b2a20785348e5 (patch)
tree7a98c5e25eb278af7eb4c7fa58ab73d819c2c739 /win/tkWinKey.c
parent41d3c8f67e62fe307c46c91e5a42b71e39c59334 (diff)
downloadtk-7a5d64437977cc14b7b79e336b3b2a20785348e5.zip
tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.gz
tk-7a5d64437977cc14b7b79e336b3b2a20785348e5.tar.bz2
Rename TkUtfToUniChar32 to TkUtfToUniChar2, and various simplifications needing less #ifdef's
Diffstat (limited to 'win/tkWinKey.c')
-rw-r--r--win/tkWinKey.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/win/tkWinKey.c b/win/tkWinKey.c
index 815ff3b..2698c4d 100644
--- a/win/tkWinKey.c
+++ b/win/tkWinKey.c
@@ -113,6 +113,7 @@ TkpGetString(
Tcl_DStringAppend(dsPtr, buf, len);
} else if (keyEv->send_event == -3) {
+
char buf[XMaxTransChars];
int len;
@@ -121,7 +122,7 @@ TkpGetString(
*/
len = Tcl_UniCharToUtf(keyEv->keycode, buf);
- if ((keyEv->keycode <= 0xffff) || (len > 3)) {
+ if ((keyEv->keycode <= 0xffff) || (len == XMaxTransChars)) {
Tcl_DStringAppend(dsPtr, buf, len);
} else {
Tcl_UniCharToUtf(((keyEv->keycode - 0x10000) >> 10) | 0xd800, buf);