Previuosly, the padding of list "name"
has been done by faking another list-length.
Correct this by using the real list-length,
and by adding a 4-byte align-pad after the list.
This yields the same total length of the struct,
and uses the correct length of the list "name".
spec:
http://cgit.freedesktop.org/xorg/proto/inputproto/tree/specs/XI2proto.txt#n768
code:
http://cgit.freedesktop.org/xorg/lib/libXi/tree/src/XIQueryDevice.c#n92
http://cgit.freedesktop.org/xorg/xserver/tree/Xi/xiquerydevice.c#n477
<field type="BOOL" name="enabled" />
<pad bytes="1" />
<list type="char" name="name">
- <!-- name_len is without padding, so we've to pad on our own,
- auto align pad after the list would be helpfull -->
- <op op="*">
- <op op="/">
- <op op="+">
- <fieldref>name_len</fieldref>
- <value>3</value>
- </op>
- <value>4</value>
- </op>
- <value>4</value>
- </op>
+ <fieldref>name_len</fieldref>
</list>
+ <pad align="4" />
<list type="DeviceClass" name="classes">
<fieldref>num_classes</fieldref>
</list>