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 /xlib | |
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 'xlib')
-rw-r--r-- | xlib/X11/Xlib.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xlib/X11/Xlib.h b/xlib/X11/Xlib.h index 8d8ec68..e8940d9 100644 --- a/xlib/X11/Xlib.h +++ b/xlib/X11/Xlib.h @@ -530,7 +530,7 @@ typedef struct _XDisplay { #endif #ifndef _XEVENT_ -#define XMaxTransChars 4 +#define XMaxTransChars 7 /* * Definitions of specific events. @@ -549,9 +549,9 @@ typedef struct { unsigned int state; /* key or button mask */ unsigned int keycode; /* detail */ Bool same_screen; /* same screen flag */ - char trans_chars[XMaxTransChars]; + char trans_chars[XMaxTransChars]; /* translated characters */ - int nbytes; + unsigned char nbytes; } XKeyEvent; typedef XKeyEvent XKeyPressedEvent; typedef XKeyEvent XKeyReleasedEvent; |