diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-01 11:03:25 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-11-01 11:03:25 (GMT) |
commit | d6a967c9d8c6cc6dc8d5792070e2c2349f6ce3d8 (patch) | |
tree | f457723f6c9c163d1c168a068b173aff785506a5 /unix | |
parent | c1921c6eef90ee6e058c465fa2a61c2b9439454e (diff) | |
download | tk-d6a967c9d8c6cc6dc8d5792070e2c2349f6ce3d8.zip tk-d6a967c9d8c6cc6dc8d5792070e2c2349f6ce3d8.tar.gz tk-d6a967c9d8c6cc6dc8d5792070e2c2349f6ce3d8.tar.bz2 |
Somewhat more progress on [a179564826]: Tk 8.6: prevent issues when encountering non-BMP Unicode characters.
Increase XMaxTransChars from 4 to 7, at the same time reducing the nbytes field from int to unsigned char.
This makes more room to NULL-terminate the trans_chars array in the XEvent, even when it's 4 bytes in length.
(fully binary compatible, since the nbytes field is not supposed to be accessed externally)
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tkUnixFont.c | 2 | ||||
-rw-r--r-- | unix/tkUnixKey.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/unix/tkUnixFont.c b/unix/tkUnixFont.c index 1e80231..96b6195 100644 --- a/unix/tkUnixFont.c +++ b/unix/tkUnixFont.c @@ -520,7 +520,7 @@ Ucs2beToUtfProc( * UCS-2BE. We know this is an LE->BE swap. */ - dst += Tcl_UniCharToUtf(htons(*((short *)src)), dst); + dst += TkUniCharToUtf(htons(*((short *)src)), dst); src += 2 /* sizeof(UCS-2) */; } diff --git a/unix/tkUnixKey.c b/unix/tkUnixKey.c index 6d4d0cf..75d5f6c 100644 --- a/unix/tkUnixKey.c +++ b/unix/tkUnixKey.c @@ -208,7 +208,7 @@ TkpGetString( Tcl_DStringValue(&buf)[len] = '\0'; if (len == 1) { - len = Tcl_UniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0], + len = TkUniCharToUtf((unsigned char) Tcl_DStringValue(&buf)[0], Tcl_DStringValue(dsPtr)); Tcl_DStringSetLength(dsPtr, len); } else { |