From 997ba45b192f21810099ed888792a45f1677a9ce Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Fri, 4 Aug 2006 11:18:16 +0300 Subject: [PATCH] fix incorrect button test Test for n (1..nButtons) being under nButtons, not button (1..(1<nButtons; + for (button = KD_BUTTON_1, n = 1; n <= pi->nButtons; button <<= 1, n++) { if (((pi->buttonState & button) ^ (buttons & button)) && !(buttons & button)) { @@ -2098,7 +2098,7 @@ KdEnqueuePointerEvent(KdPointerInfo *pi, unsigned long flags, int rx, int ry, dixflags, FALSE); } } - for (button = KD_BUTTON_1, n = 1; button <= pi->nButtons; + for (button = KD_BUTTON_1, n = 1; n <= pi->nButtons; button <<= 1, n++) { if (((pi->buttonState & button) ^ (buttons & button)) && (buttons & button)) {