Explorar o código

Fix uninitialised variable

Mathieu Eyraud %!s(int64=2) %!d(string=hai) anos
pai
achega
a4f3905bb6
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/joystick/SDL_joystick.c

+ 1 - 0
src/joystick/SDL_joystick.c

@@ -585,6 +585,7 @@ static SDL_bool ShouldAttemptSensorFusion(SDL_Joystick *joystick, SDL_bool *inve
         SDL_JoystickGUID guid;
         Uint16 vendor, product;
         SDL_bool enabled;
+        SDL_zero(gamepads);
 
         /* See if the gamepad is in our list of devices to enable */
         guid = SDL_GetJoystickGUID(joystick);