aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/Xext/panoramiX.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/Xext/panoramiX.c')
-rw-r--r--xorg-server/Xext/panoramiX.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/Xext/panoramiX.c b/xorg-server/Xext/panoramiX.c
index 070f54d7a..6eefa9789 100644
--- a/xorg-server/Xext/panoramiX.c
+++ b/xorg-server/Xext/panoramiX.c
@@ -1051,14 +1051,15 @@ int
ProcXineramaQueryScreens(ClientPtr client)
{
/* REQUEST(xXineramaQueryScreensReq); */
+ CARD32 number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
xXineramaQueryScreensReply rep;
REQUEST_SIZE_MATCH(xXineramaQueryScreensReq);
rep.type = X_Reply;
rep.sequenceNumber = client->sequence;
- rep.number = (noPanoramiXExtension) ? 0 : PanoramiXNumScreens;
- rep.length = bytes_to_int32(rep.number * sz_XineramaScreenInfo);
+ rep.length = bytes_to_int32(number * sz_XineramaScreenInfo);
+ rep.number = number;
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);