From fa85f7811e8bd121eb91caa5cc4fcb7d38e93c16 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 25 Oct 2011 23:49:33 -0700 Subject: [PATCH] XQuartz: appledri: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston (cherry picked from commit dc054fefc586c5b404fe0f949dbd456e5267c647) --- hw/xquartz/xpr/appledri.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xquartz/xpr/appledri.c b/hw/xquartz/xpr/appledri.c index 129fc7836..80955fe27 100644 --- a/hw/xquartz/xpr/appledri.c +++ b/hw/xquartz/xpr/appledri.c @@ -541,9 +541,11 @@ AppleDRIExtensionInit(void) SProcAppleDRIDispatch, AppleDRIResetProc, StandardMinorOpcode))) { + size_t i; DRIReqCode = (unsigned char)extEntry->base; DRIErrorBase = extEntry->errorBase; DRIEventBase = extEntry->eventBase; - EventSwapVector[DRIEventBase] = (EventSwapPtr) SNotifyEvent; + for (i=0; i < AppleDRINumberEvents; i++) + EventSwapVector[DRIEventBase + i] = (EventSwapPtr) SNotifyEvent; } }