mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-06-07 02:58:22 +02:00
Xext/xres: fix client PID value swap in ConstructClientIdValue
value points to the location of the client PID, assign it first before we swap it. For consistency move the memcpy up too so the copy commands are all in the same location. Assisted-by: Claude:claude-claude-opus-4-6 Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2200>
This commit is contained in:
parent
3c576260f2
commit
281d524e04
1 changed files with 2 additions and 2 deletions
|
|
@ -508,11 +508,11 @@ ConstructClientIdValue(ClientPtr sendClient, ClientPtr client, CARD32 mask,
|
|||
swapl (&rep.length);
|
||||
}
|
||||
|
||||
memcpy(ptr, &rep, sizeof(rep));
|
||||
*value = pid;
|
||||
if (sendClient->swapped) {
|
||||
swapl (value);
|
||||
}
|
||||
memcpy(ptr, &rep, sizeof(rep));
|
||||
*value = pid;
|
||||
|
||||
ctx->resultBytes += sizeof(rep) + sizeof(CARD32);
|
||||
++ctx->numIds;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue