Selaa lähdekoodia

Fixed uninitialized variable

Sam Lantinga 2 vuotta sitten
vanhempi
commit
35c13196f0
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  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();