From dc054fefc586c5b404fe0f949dbd456e5267c647 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 25 Oct 2011 23:49:33 -0700 Subject: XQuartz: appledri: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston --- 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 6b4a8a383..44c132abc 100644 --- a/hw/xquartz/xpr/appledri.c +++ b/hw/xquartz/xpr/appledri.c @@ -529,9 +529,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; } } -- cgit v1.2.3