From a1d638da0d12c82c944bfecb996903210879f426 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Tue, 25 Oct 2011 23:53:43 -0700 Subject: XWin: windowswm: Correct byte swapping in event notifications Signed-off-by: Jeremy Huddleston Reviewed-by: Jon TURNEY (cherry picked from commit 286fa9bf9b4ffb0f9dbd3f1cae46ddcb27ee9318) --- hw/xwin/winwindowswm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/xwin/winwindowswm.c b/hw/xwin/winwindowswm.c index 71384097f..f5d27e5d5 100644 --- a/hw/xwin/winwindowswm.c +++ b/hw/xwin/winwindowswm.c @@ -629,9 +629,11 @@ winWindowsWMExtensionInit (void) NULL, StandardMinorOpcode))) { + size_t i; WMReqCode = (unsigned char)extEntry->base; WMErrorBase = extEntry->errorBase; WMEventBase = extEntry->eventBase; - EventSwapVector[WMEventBase] = (EventSwapPtr) SNotifyEvent; + for (i=0; i < WindowsWMNumberEvents; i++) + EventSwapVector[WMEventBase + i] = (EventSwapPtr) SNotifyEvent; } } -- cgit v1.2.3