Source

love / src / modules / joystick / sdl / Joystick.cpp

Diff from to

src/modules/joystick/sdl/Joystick.cpp

 			
 		for (int button = *buttonlist; button != -1; button = *(++buttonlist))
 		{
-			if (button < num && SDL_JoystickGetButton(joysticks[index], button) == 1)
+			if (button >= 0 && button < num && SDL_JoystickGetButton(joysticks[index], button) == 1)
 				return true;
 		}