Commit 71a42145 authored by Julien Cristau's avatar Julien Cristau

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's avatarPeter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Julien Cristau's avatarJulien Cristau <jcristau@debian.org>
parent 8c255b30
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment