diff options
author | Julien Cristau <jcristau@debian.org> | 2014-10-27 19:00:36 +0100 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2014-10-28 08:48:29 +0100 |
commit | 71a42145b678be623e30bd5bf55833a04f14376f (patch) | |
tree | d89db1a4a974ae55e1752efcc21e405e61a4dae5 | |
parent | 8c255b30f3a4ed8bf67e6bb76df47cbd480735f8 (diff) |
Advance the request buffer by the right amount in XIChangeHierarchy
c->length is in 4-byte units, dptr is a char *, so we need to advance
dptr by 4 * length to get the position of the next HierarchyChangeInfo.
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | src/XIHierarchy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XIHierarchy.c b/src/XIHierarchy.c index 39c3d1b..3d2b4f2 100644 --- a/src/XIHierarchy.c +++ b/src/XIHierarchy.c @@ -109,7 +109,7 @@ XIChangeHierarchy(Display* dpy, c->name_len = strlen(C->name); c->length = (sizeof(xXIAddMasterInfo) + c->name_len + 3)/4; strncpy((char*)&c[1], C->name, c->name_len); - dptr += c->length; + dptr += 4 * c->length; } break; case XIRemoveMaster: |