[Xcb] [PATCH proto 3/3] sync: Fix length of name in SYSTEMCOUNTER
Daniel Martin
consume.noise at gmail.com
Sun Dec 23 04:51:50 PST 2012
Name might be padded and therefor name_len is not sufficient. If we
don't compute it correctly the iterator doesn't work.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
src/sync.xml | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/src/sync.xml b/src/sync.xml
index 56ef48e..bd941e0 100644
--- a/src/sync.xml
+++ b/src/sync.xml
@@ -54,7 +54,21 @@ for licensing information.
<field type="INT64" name="resolution" />
<field type="CARD16" name="name_len" />
<list type="char" name="name">
- <fieldref>name_len</fieldref>
+ <!-- Name is padded to the 4byte boundary. The preceding fields have
+ to be taken into account (sz_SYSTEMCOUNTER = 14). -->
+ <op op="-">
+ <op op="*">
+ <op op="/">
+ <op op="+">
+ <fieldref>name_len</fieldref>
+ <value>17</value> <!-- sz_SYSTEMCOUNTER + 3 -->
+ </op>
+ <value>4</value>
+ </op>
+ <value>4</value>
+ </op>
+ <value>14</value> <!-- sz_SYSTEMCOUNTER -->
+ </op>
</list>
</struct>
--
1.8.0.2
More information about the Xcb
mailing list