Merged requested to merge yuyichao/libx11:fix-size into master
The check here guards the read below.
XimType_XIMStyles, these are
CARD32 and for
XIMTRIGGERKEY ref which is defined as 3 x
(There are data after the
XIMTRIGGERKEY according to the spec but they are not read by this
function and doesn't need to be checked.)
The old code here used the native datatype size instead of the wire protocol size causing the check to always fail.
Also fix the size calculation for the header (size). It is 2 x CARD16 for both types
despite the unused
This fixes a regression caused by 388b303c in 1.6.10.
Fix #116 (closed)