From 095451bb9b51c131413f7ef860427f380d643088 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 1 Jun 2017 00:39:07 -0400 Subject: [PATCH] SDL_ResetMouse was using a bogus mouse button, causing a "<< -1" shift. Note that we got rid of SDL_ResetMouse() entirely for SDL 2.0, but for 1.2, this is a small fix that doesn't otherwise alter behavior in any serious way. Fixes Bugzilla #3593. --- src/events/SDL_mouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c index e37a4c6af..0320d6167 100644 --- a/src/events/SDL_mouse.c +++ b/src/events/SDL_mouse.c @@ -62,7 +62,7 @@ void SDL_MouseQuit(void) void SDL_ResetMouse(void) { Uint8 i; - for ( i = 0; i < sizeof(SDL_ButtonState)*8; ++i ) { + for ( i = 1; i < sizeof(SDL_ButtonState)*8; ++i ) { if ( SDL_ButtonState & SDL_BUTTON(i) ) { SDL_PrivateMouseButton(SDL_RELEASED, i, 0, 0); }