diff options
Diffstat (limited to 'xorg-server/randr/rrscreen.c')
-rw-r--r-- | xorg-server/randr/rrscreen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c index dd645a936..e7eb75cc2 100644 --- a/xorg-server/randr/rrscreen.c +++ b/xorg-server/randr/rrscreen.c @@ -664,8 +664,9 @@ ProcRRGetScreenInfo (ClientPtr client) rep.sizeID = pData->size; rep.rate = pData->refresh; - extraLen = (rep.nSizes * sizeof (xScreenSizes) + - rep.nrateEnts * sizeof (CARD16)); + extraLen = rep.nSizes * sizeof (xScreenSizes); + if (has_rate) + extraLen += rep.nrateEnts * sizeof (CARD16); if (extraLen) { |