Explorar o código

Fixed uninitialized variable

Sam Lantinga %!s(int64=2) %!d(string=hai) anos
pai
achega
35c13196f0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/joystick/SDL_joystick.c

+ 1 - 1
src/joystick/SDL_joystick.c

@@ -202,7 +202,7 @@ static SDL_bool SDL_GetDriverAndJoystickIndex(int device_index, SDL_JoystickDriv
 
 static int SDL_FindFreePlayerIndex()
 {
-    int player_index;
+    int player_index = -1;
 
     SDL_AssertJoysticksLocked();